Try OpenEdge Now
skip to main content
Managed Adapters Guide
Email Managed Adapter : Preconfiguring the Email Adapter
 

Preconfiguring the Email Adapter

Before being used, the Email Adapter requires some information about your mail server. Although you can supply this information every time when you use the Email Adapter in one of your business processes, it may be more convenient to preconfigure the adapter. By preconfiguring the Email Adapter, you will not have to enter the same information every time.
To preconfigure the Email Adapter:
1. From Tools menu, select Managed Adapters to open the Managed Adapter Browser (available only from Progress Developer Studio for OpenEdge) dialog box. In this browser, expand EmailAdapters and double-click the GenericEmailAdapter to display the Email Adapter Configurator dialog box.
2. Click the Content tab.
3. On the Content tab, click the Subject tab and add a template or import a template by clicking the Add and the Import . Click Edit to edit the template.
Caution: The maximum number of characters allowed for a subject line is 998 and anything above this limit will not appear in the subject line. Do not use multi-line templates for subject. Any line breaks that you enter will be replaced with spaces and the entire subject will appear in one line.
4. Click the Body tab and add a template or import a template by clicking the Add and the Import. Click Edit to edit the template.
Note: In addition to configuring, you can use the Managed Adapter Browser to perform functions like creating a copying, renaming, deleting, as well as importing and exporting the configuration information. For more information, refer to the "Using the Managed Adapter Browser" section of the OpenEdge Getting Started: Developing BPM Applications with Developer Studio.
5. Click the Configuration tab and enter the mail server information as detailed in the following steps.
6. Set the Mail Host parameter to the name of your SMTP server. If your environment requires some special settings, you may enter them in the Extra Properties text area.
7. If your email (SMTP) server requires authentication, enter a user name and password in the appropriate fields.
Note: In most cases, you may only need to modify the Mail Host parameter to the name of your SMTP server. For more information, see the full list of SMTP server properties found at Sun’s javax.mail documentation at the following URL address: http://java.sun.com/products/javamail/javadocs/index.html.
8. In the Language field, enter the language that you wish to specify for this template.
If you do not specify a language here, you must select the language in Dataslot Mapping.
9. Typically, in case of a serious error (for example, inaccessible mail server or an invalid e-mail address format) the E-mail Managed Adapter throws an exception, and suspends the adapter workstep.
Select the Errors as Output check box if you do not want to suspend the workstep. It also presents a parameter with the error description in the adapter outputs. You can map this output to a string dataslot. For more information about mapping dataslots, refer to Defining mapping. In the process, you can evaluate this dataslot value, and if it is not empty, decision about error handling can be taken as per your requirements.
10. In the Extra Properties text box, you can set the following parameters.
a. You can use the allow.null.cc and allow.null.bcc parameters to specify what the adapter should do if cc or bcc has a null value. If the "Cc" or "Bcc" field is mapped to a null CHARACTER dataslot, the Email Adapter ignores it. However, you can change this default behavior. To do so, set the following parameters to false.
        allow.null.cc=true
        allow.null.bcc=true
The default value of this parameter is true.
b. You can use the mail.dispatch parameter to specify whether the adapter should send a single message to all the recipients or multiple messages individually to each recipient. The syntax of this parameter is as given below:
        mail.dispatch=[single|multiple]
If you set this parameter to single, the adapter sends a single message to all recipients listed in the "To:" field. However, this disables the message customization as described in Sending messages to multiple recipients. The default value of this parameter is multiple.
c. You can use the mail.ignore parameter to suppress errors generated by a specified plugin. The syntax of this parameter is as given below:
        mail.ignore.<plugin_name>.errors=[true|false]
When a plugin encounters a problem during invocation, the adapter is suspended by default. If you set this parameter to "true" for a particular plugin, the adapter will not be suspended, and the message will be sent without the message content causing the error.
d. You can use the mail.ignore.attachment.errors parameter to send the message without attaching a document. The syntax of this parameter is as given below:
        mail.ignore.attachment.errors=[true|false]
11. Once you have configured your mail server, click OK to close the Adapter Configurator.
From now on, the configuration you set will be preset by default every time you use the Email Adapter in a business process.