Integration Server 10.3 | Built-In Services Reference Guide | Client Folder | Summary of Elements in this Folder | pub.client:smtp
 
pub.client:smtp
WmPublic. Sends a MIME-type e-mail message.
You may attach one or more content objects or files to the message.
Input Parameters
Note:
This service is enhanced with type and token parameters for PIE-66302 in IS_10.3_Core_Fix14.
to
String Optional. E-mail address of the receiver. If you specify multiple addresses, separate them with commas.
cc
String Optional. E-mail addresses of additional receivers. If you specify multiple addresses, separate them with commas.
bcc
String Optional. E-mail addresses of additional receivers. If you specify multiple addresses, separate them with commas.
subject
String Optional. Subject of the message.
subjectCharset
String Optional. The character set used to encode the MIME message headers (including subject). If subjectCharset is not specified, then charset is used. If charset is not specified, the value in the server configuration parameter watt.server.email.charset is used. If that parameter is not set, the utf-8 encoding is used.
charset
String Optional. The character encoding of the body text. If you do not specify the value of charset, the value in the server configuration parameter watt.server.email.charset is used. If that parameter is not set, the utf-8 encoding is used.
from
String Optional. E-mail address of the sender. If you do not specify a from value, Integration Server uses the value specified for the mail.smtp.from JVM property. If no value is specified for that property, Integration Server uses the default value, user@servername, where user is the operating system user ID, and servername is the host name of the Integration Server.
mailhost
String SMTP host name for outbound messages. For example: smtp.webMethods.com
If no value is provided for the mailhost parameter, Integration Server uses the value of the Java system property mail.smtp.host set for Integration Server as the mailhost value. For more information about setting Java system properties for Integration Server, which includes modifying the custom_wrapper.conf file, see Changing Settings in the Configuration File custom_wrapper.conf.
If no value is supplied for the mailhost parameter and the mail.smtp.host Java system property is not set, the pub.client:smtp service ends with an exception.
mailhostPort
String Optional. The number of the port on which the SMTP host listens. This parameter does not need to be set if the host listens on port 25 (the standard SMTP port).
auth
Document Optional. Authorization information that the SMTP service will submit.
Key
Description
type
String. Specifies how you want to authenticate the user on the specified e-mail server.
*Select Basic to authenticate the user on the specified e-mail server with only username and password. This is the default authentication type.
*Select Bearer to authenticate the user on the specified e-mail server with the access token issued by the OAuth server.
user
String. The username that this service submits when requesting a protected resource.
pass
String. Conditional. Password associated with user. This parameter is required only when auth is Basic.
token
String. Conditional. The access token issued by the OAuth server to Integration Server. This parameter is required only when auth is Bearer. To get the access token, see pub.client.oauth:​getExternalAccessToken
secure
Document Optional. Parameters specifying the security protocol and truststore information for certificate validation that Integration Server uses when communicating with the SMTP server port.
Key
Description
transportLayerSecurity
String Type of security protocol Integration Server uses when communicating with the SMTP server port. Set to:
*none to use a non-secure mode when communicating with the port on the SMTP server. This is the default.
*explicit to use explicit security when communicating with the port on the SMTP server. With explicit security, Integration Server establishes an un-encrypted connection to the e-mail server and then switches to the secure mode.
*implicit to use implicit security when communicating with the port on the SMTP server. With implicit security, Integration Server always establishes an encrypted connection to the e-mail server.
truststoreAlias
String Optional. Alias for the truststore that contains the list of certificates that Integration Server uses to validate the trust relationship.If you do not specify a truststore alias, the default truststore alias will be used.
useJSSE
String. Optional. Determines if the JSSE library is used to create outbound SMTP connections. This parameter can have one of the following values:
*Blank (default). The value of the watt.net.ssl.email.client.useJSSE configuration property is used.
*yes, to use the JSSE library to create a port that supports TLS 1.1 or TLS 1.2.
*no, to use the Entrust IAIK library to create a port that supports only SSL 3.0 and TLS 1.0.
Note:
JSSE library support introduced for PIE-61569 in IS_10.3_Core_Fix9.
body
String Optional. The content of the message.
mimeStream
java.io.InputStream Optional. MIME or S/MIME message that you want to send in the e-mail. A mimeStream is created by the pub.mime:getEnvelopeStream, pub.smime:createEncryptedData, pub.smime:createSignedData, or pub.smime.keystore:createSignedData services. It contains both headers and content. If the mimeStream already contains the from, to, and subject headers, you do not need to pass them as individual inputs to this service.
attachments
Document List Optional. Attachments to the message. Each attachment defines one message part in a multi-part message.
Key
Description
contenttype
String MIME type of the message. For example:
application/x-edi-message    
content
byte[ ], String, or java.io.InputStream Content of the message.
filename
String Name to assign to the attachment. If you do not specify attachment/content, the parameter specifies the file name of a local file to attach to the message. In other words:
*If you specify attachment/content and attachments/filename, the service uses the value of attachments/filename as the name to assign to the attachment specified by attachment/content .
*If you specify attachments/filename, but not attachment/content, the service attaches the local file specified by attachments/filename.
encoding
String Optional. Encoding of the message. For example: base64 or 7bit. If encoding is not specified, 7bit is used.
charset
String Optional. Character set encoding of the attachment. This value is added to the Content-Type header for the attachment. If charset is not specified, the value in the server configuration parameter watt.server.email.charset is used. If that parameter is not set, the utf-8 encoding is used.
properties
Document List Optional. SMTP system properties to send to the SMTP server. This parameter overrides the settings on the watt.config.systemProperties server configuration parameter. If you omit this properties parameter, Integration Server uses the settings specified on the watt.config.systemProperties server configuration parameter.
Key
Description
name
Name of the SMTP system property.
value
Value to specify for the SMTP property.
Output Parameters
status
String Final status of service.
Usage Notes
Any one of the recipient fields, that is the to, cc, or the bcc parameter, must be defined.
If you are using filename to attach a file to the message and the file is not a plain text file, you must set the contenttype and encoding. For example, to attach IntegrationServer_directory\instances\instance_name\mydir\myfile.doc to a pub.client:smtp service, you would invoke the service with the following values in attachments:
contenttype:application/msword
filename:instances/instance_name/mydir/myfile.doc
encoding:base64