The EMAIL WSDL extensibility elements allow the user to "configure" 2 sets of information for use in the EMAIL Binding Component: EMAIL connectivity information and binding information to convert WSDL messages to and from EMAIL messages.
This page describes the elements for each of these 2 groups.
EMAIL address element attributes:
| Attribute Name | Description | Mandatory | Example |
|---|---|---|---|
| emailserver | The EMAIL server used by the client interactions. When the server is implementing this WSDL, this attribute is ignored | No | mail.google.com |
| port | The port of the EMAIL server. When the server is implementing this WSDL, this is the port no the server will listen on. If this WSDL is used for invoking operation, this is the port the BC will try to connect to. The default port is 25 for plain text interaction and 465 for SSL based interaction. | No | 25 |
| useSSL | Used to specify if the SMTP Server requires SSL authentication. | No | true |
| userName | Used to specify the username for connecting to other external SMTP Server. | No | user123 |
| passWord | Used to specify the password for connecting to other external SMTP Server | No | abc123 |
| MailFolder | Used to specify the mailbox name for retrieving mails from the server | No | |
| MaxMessages | Used to specify the number of messages that can be retrieved at a time | No | |
| MessageAckMode | used to specify Message ack based on the response from NMR | No | |
| MessageAckOperation | Used to specify the operation used to acknowledge the message | No | |
| PollingInterval | Used to specify the polling interval | No |
The following is a sample usage of the EMAIL address extensiblity element defined for a service port,
<port binding="y:binding" name="emailEndpoint"> <email:IMAPaddress emailserver="localhost" useSSL="false" port="25" username="sa158235" password="dsds" MailFolder="MailFolder" MaxMessages="20" MessageAckMode="Automatic" MessageAckOperation="Delete" PollingInterval="20" </port>
EMAIL binding element attributes:
| Attribute Name | Description | Mandatory | Example |
|---|
EMAIL binding sub-elements:
| Element Name | Description | Mandatory | Example |
|---|
The smtp:binding element MUST be present when using the SMTP binding.
<definitions .... >
<binding .... >
<email:binding />
</binding>
</definitions>
<definitions .... >
<binding .... >
<smtp:binding>
<smtp:proxy host="proxyhost.com" port="25" userName="user" password="password">*
</smtp:binding>
</binding>
</definitions>
SMTP operation element attributes:
| Attribute Name | Description | Mandatory | Example |
|---|
<definitions .... >
<binding .... >
<operation .... >
<smtp:operation />
</operation>
</binding>
</definitions>
SMTP input element attributes:
| Attribute Name | Description | Mandatory | Example |
|---|---|---|---|
| message | Refers to the message part containing the SMTP message to be sent. | No | part1 |
| from | Refers to the message part containing the sender of the SMTP message. This is generally an email address | No | part1 |
| to | Refers to the message part containing the "to" email addresses to which the email has to be sent. This is generally a comma separated / semi-colon separated email addresses | No | part1 |
| cc | Refers to the message part containing the "cc" email addresses to which the email has to be sent. This is generally a comma separated / semi-colon separated email addresses | No | part1 |
| bcc | Refers to the message part containing the "bcc" email addresses to which the email has to be sent. This is generally a comma separated / semi-colon separated email addresses | No | part1 |
| subject | Refers to the message part containing the subject of the SMTP message. | No | part1 |
| charset | Refers to the message part containing the character set of the SMTP message. | No | utf-8 |
| use | This attribute can be used to specify if the message part containing the SMTP message is encoded or not. The values are encoded/literal. The default is literal. | No | encoded |
| encocdingStyle | This attribute can be used to specify the encoding scheme to be used if the "use" attribute is set to "encoded". This should be a valid name of an encoder module. | No | customencoder-1.0 |
SMTP input sub-elements:
| Element Name | Description | Mandatory | Example |
|---|---|---|---|
| attachment | Represents an attachment to a SMTP message | No | *See smtp:attachment section* |
<definitions .... >
<binding .... >
<operation .... >
<input>
<smtp:input message="nmtokens"? subject="nmtokens"? from="nmtokens"? to="nmtokens"? cc="nmtokens"? bcc="nmtokens"
use="encoded" encodingStyle="customencoder-1.0"? charset="string"? />
</input>
</operation>
</binding>
</definitions>
Notes on message, from, and subject: These elements MUST refer to part names from the input message.
Notes on to, cc, and bcc: These elements MUST refer to part names from the input message. In the runtime the content of these messages should evaluate to comma separated / semi-colon separated email ids of the form username@domain.com
The attachment element is a sub-element of the smtp:input element. This element is currently unsupported but is included for future feature enhancements.
SMTP attachment element attributes:
| Attribute Name | Description | Mandatory | Example |
|---|---|---|---|
| contentType | Refers to the message part containing the content type of the attachment | Yes | part1 |
| name | Indicates how message parts will be encoded in the SMTP fault | Yes | part1 |
| content | Indicates a particular encoding style to use | Yes | part1 |
<definitions .... >
<binding .... >
<operation .... >
<input>
<smtp:input message="nmtokens"? subject="nmtokens"? from="nmtokens"?
charset="string"?>
<smtp:attachment contentType="nmtokens" name="nmtokens" content="nmtokens"/>
</smtp:input>
</input>
</operation>
</binding>
</definitions>
Notes on contentType, name, and nmtokens: These elements MUST refer to part names from the input message.