The SMTP WSDL extensibility elements allow the user to "configure" 2 sets of information for use in the SMTP Binding Component: SMTP connectivity information and binding information to convert WSDL messages to and from SMTP messages.
This page describes the elements for each of these 2 groups.
SMTP address element attributes:
| Attribute Name | Description | Mandatory | Example |
|---|---|---|---|
| location | A URL which specifies the location of the receiver. The URL follows the standard "mailto" URL Scheme from RFC 2368 | Yes | mailto:someuser@somedomain.com |
| smtpserver | The SMTP server used by the client interactions. When the server is implementing this WSDL, this attribute is ignored | No | mail.google.com |
The following is a sample usage of the SMTP address extensiblity element defined for a service port,
<port binding="y:binding" name="smtpEndpoint"> <smtp:address location="mailto:someuser@somedomain.com" smtpserver="mail.google.com"/> </port>
Notes on location: The URL scheme must conform to RFC 2368.
SMTP binding element attributes:
| Attribute Name | Description | Mandatory | Example |
|---|
SMTP binding sub-elements:
| Element Name | Description | Mandatory | Example |
|---|---|---|---|
| proxy | Represents a proxy to route SMTP messages through | No | *See smtp:proxy section* |
The smtp:binding element MUST be present when using the SMTP binding.
<definitions .... >
<binding .... >
<smtp:binding />
</binding>
</definitions>
SMTP proxy element attributes:
| Attribute Name | Description | Mandatory | Example |
|---|---|---|---|
| host | The host for sending SMTP messages | Yes | proxyhost.com |
| port | The port used for sending SMTP messages. This must be an integer corresponding to a semantically correct port number | No | 25 |
| userName | The user name for sending SMTP messages | No | user |
| password | The password for sending SMTP messages | No | password |
<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 |
| 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 |
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"?
charset="string"? />
</input>
</operation>
</binding>
</definitions>
Notes on message, from, and subject: These elements MUST refer to part names from the input message.
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.