E-Mail Adapter
Requirements
This adapter requires an SMTP server. For additional information see: Configure SMTP E-mail (IIS 7)
Adapter Modes
The adapter only supports one mode of operation.
Mode | Description |
Subscribe | Send a message from Neuron as an e-mail. |
Subscribe Mode
When the adapter receives a message from Neuron, an email will be sent.
Unless otherwise specified (see sections: Adapter Metadata and Message Format), the body of the ESBMessage will become body of the email message.
Adapter Properties
Property Name | Description |
Default From Address | Sets the e-mail address of the sender. |
Default To Address | Sets the recipient. A semicolon-delimited list of e-mail addresses. |
Default Subject | Sets the subject line of the e-mail message. |
Mail Server | Sets the SMTP server. |
The values of properties: Default From Address, Default To Address and Default Subject are only used when these properties are not specified in the adapter metadata or in the body of the ESBMessage.
When using adapter metadata or the XML mail message format, additional properties are available.
Adapter Metadata
When the Neuron adapter endpoint has the include metadata option set, then the adapter will use the following properties in the ESBMessage received from Neuron. The adapter metadata must be specified in the custom properties of the message header.
The names of the properties are case sensitive.
All of the adapter metadata properties are optional even when the include metadata option is set.
Property Name | Description |
mail_out.From | Sets the e-mail address of the sender. |
mail_out.To | Sets the recipient. A semicolon-delimited list of e-mail addresses. |
mail_out.Cc | Sets the CC recipient. A semicolon-delimited list of e-mail addresses that receive a carbon copy of the email. |
mail_out.Subject | Sets the subject line of the e-mail message. |
mail_out.Body | Sets the e-mail body. The default body is the ESBMessage body. |
mail_out.Attachment | Sets the attachment. A full path to the file to include as an attachment on the e-mail. |
mail_out.Server | Sets the SMTP server. |
The attachment file will be locked while the mail is being sent.
Message Format
Subscribe Mode
Option 1
By default, the ESBMessage body will become the body of the email message.
Example:
<html>
<p>Hello World!</p>
</html>
Option 2
If the ESBMessage body conforms to the following XML format, then an email message will be constructed using the values as specified.
<Mail>
<From></From>
<To></To>
<Cc></Cc>
<Subject></Subject>
<Body></Body>
<Server></Server>
<Attachment></Attachment>
</Mail>
If the mail message body contains an <html> element, as in the example below, the email message format will be HTML.
Example:
<Mail>
<From>tom.smith@mycompany.com</From>
<To>george.baxter@yourcompany.com;howard.beach@yourcompany.com</To>
<Cc>keith.donnegan@mycompany.com</Cc>
<Subject>Travel Policy Clarification</Subject>
<Body>
<html>
<head>
<title>Mail Page</title>
</head>
<body bgcolor="#6699ff" style='font-family: Candara'>
<p>Please review the attached company travel policy.</p>
</body>
</html>
</Body>
<Attachment>c:\docs\TravelPolicy.pdf</Attachment>
</Mail>