Sending Workflow 8 E-mails Using Authenticated SMTP and SSL.

April 8, 2008 | KB: 1011958
Workflow Suite 8.0

Summary

This article details the process of enabling Workflow 8 to support SMTP e-mail servers that require authentication and/or SSL.

Note: Before completing the steps below, ensure you have used the Workflow Server Configuration Utility's E-mail Configuration step to define a mail server address. If you complete the Adding SMTP Authentication section below, it is not necessary to define an e-mail sender address or a port number using the utility. More info.

Important: Some of the steps below involve editing the Workflow Server's configuration file. This file, named Laserfiche.Workflow.Service.exe.config, is located in the Workflow installation folder, which by default is in C:\Program Files\Laserfiche\Laserfiche Workflow. We recommend backing up the file before making any changes. In the event the Workflow Server will not run correctly after completing the steps below, replace the modified configuration file with the original.

Adding SMTP Authentication

Complete the steps below to configure Workflow to send e-mails using a server that requires SMTP authentication.
  1. Using a text editor (e.g., Notepad), open the Workflow Server's configuration file.
  2. Add the following text under <configSections>, directly before </configSections>.

    <sectionGroup name="system.net" type="System.Net.Configuration.NetSectionGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    </sectionGroup>

  3. Add the following text at the bottom of the file, directly before </configuration>. Edit the e-mail address, username, password, and port values based on the authentication information required by the e-mail server you want to use (all values are required, including a port number; if you are unsure of the port number, try 25).

    <system.net>
     <mailSettings>
      <smtp deliveryMethod="Network" from="email@domain.com" >
       <network userName="myusername" password="mypassword" port="portnumber" />
      </smtp>
     </mailSettings>
    </system.net>

  4. If you do not need to enable SSL, save your changes and restart the Workflow Server. Otherwise, complete the Adding SSL Support section below.

Adding SSL Support

Complete the steps below to configure Workflow to send e-mails using a server that requires Secure Socket Layer (SSL) to be enabled.
  1. In the Workflow Server's configuration file, locate the following text:

    <setting name="DefaultEmailSubject" serializeAs="String">

  2. Directly above the text you located in the previous step, add the following text:

    <setting name="UseSSLForEmail" serializeAs="String">
     <value>True</value>
    </setting>

  3. Save your changes and restart the Workflow Server.

Note: Workflow e-mail server settings can be defined in three different places: (Location 1) Workflow Server Configuration Utility, (Location 2) Workflow Server's configuration file, (Location 3) On-the-fly for a specific activity in the Workflow Designer. If an e-mail setting is defined in multiple places, and there is a contradiction, the following order of precedence applies: Location 3, Location 2, Location 1.

Example

To enable Workflow to send e-mails using GMail, enable authenticated SMTP and SSL in the Workflow Server's configuration file. Use the following SMTP text:

<system.net>
 <mailSettings>
  <smtp deliveryMethod="Network" from="username@gmail.com" >
   <network userName="username@gmail.com" password="password" port="587" />
  </smtp>
 </mailSettings>
</system.net>

Related Links