IBM Tivoli Directory Integrator
The SendEMail Function Component uses the JavaMail API to send
e-mails. By connecting to an Simple Mail Transfer Protocol (SMTP)
server, the SendEMail Function Component can send e-mails to multiple
recipients and can optionally attach multiple files to e-mails. You
can also attach multiple files with different Multipurpose Internet
Mail Extensions (MIME) types.
Many Web-based e-mail services provide access only
to browsers with HTTP. These services cannot be accessed using the
SendEMail Function Component.
The SendEMail Function Component sends e-mails using an SMTP server;
we can either use configuration parameters or map Attributes to operate
this Function Component. The description of the input and output schemas
is as follows:
Output Schema
- attachments
- A multivalued attribute. Each value specifies an attachment
file to be added to the e-mail. Each value is either the absolute
file path or a file path relative to the working directory. If the
attribute is present it overrides the value of the attachments function
component parameter.
In order to attach each file with different
MIME type, we can provide the MIME type of attachment after the name
of the file separated by ">".
For example:
SomeDocument.pdf>application/pdf
- body
- String object that contains the body text of the mail. The Entry
Attribute is required. An exception is thrown if the attribute is
not present.
- from
- The attribute specifies the content of the from field
in the mail. If the attribute is present it overrides the value of
the From function component parameter.
- recipients
- The attribute should be a comma separated list of the recipients
of the mail. If the attribute is present it overrides the value of
the Recipients function component parameter.
- smtpServerHost
- The attribute specifies the address of the SMTP server used
to send the mails. If the attribute is present it overrides the value
of the SMTP Server Host function component parameter.
- smtpServerPort
- The attribute specifies the port of the SMTP server used to
send the mails. If the attribute is present it overrides the value
of the SMTP Server Port function component parameter.
- Subject
- The attribute specifies the subject of the mail. If the attribute
is present it overrides the value of the Subject function
component parameter. A value for this field should be given, either
mapped as an Attribute or provided in the Subject function
component parameter, otherwise an exception is thrown.
- replyTo
- The attribute specifies the "reply-to" field of the
message object. It contains a String object representing an array
of mail addresses separated by commas. This String parameter is converted
to InternetAddress Objects. Afterwards the created addresses are set
to the outgoing message using the setReplyTo method of the message
Object.
Input Schema
- status
- This attribute is a java.lang.String object containing value "OK"
if the mail has been sent successfully (that is, has been accepted
by the SMTP Server).
The SendEMail Function Component uses the following parameters:
- SMTP Server Host
- The parameter specifies the address of the SMTP server that
sends mails. If this parameter is not set the smtpServer Entry
Attribute should be mapped.
- SMTP Server Port
- The parameter specifies the port of the SMTP server that sends
mails. If this parameter is not set the smtpServerPort Entry
Attribute should be mapped. The mapped smtpServerPort Entry
Attribute will take precedence over this parameter, even if it is
set.
- Username
- This parameter is the user name used for SMTP authentication.
Do not enter a value for this parameter if the SMTP Server does not
require a user name and password authentication.
- Password
- This parameter is the password used for SMTP authentication.
- Use SSL
- Checking this parameter causes the FC to use Secure Sockets
Layer (SSL) to communicate with the SMTP server.
- From
- Specifies the content of the From field
in the e-mail. If this parameter is not set, the from Entry
Attribute should be mapped. The from parameter cannot contain
spaces.
- Recipients
- This parameter is a comma separated list of the recipients'
addresses. If it is not set, the recipients Entry Attribute
should be mapped.
- Subject
- Specifies the subject of the e-mail.
- Attachments
- This multivalued parameter allows us to attach any files(s)
we want to include with your message. Each value is either the absolute
file path or a file path relative to the working directory. To set
different a MIME type for individual attached files, add the MIME
attachment type after file name. The MIME type and file name must
be separated by the character >. For example:
SomeDocument.pdf>application/pdf
- MIME Content Type
- This parameter allows us to set the MIME content type of the
e-mail's body; text/plain is the default value.
- MIME Charset
- Specifies the MIME charset to use for encoded words and text
parts. If left blank the default system charset is used. Supported
encodings can be found at: http://java.sun.com/j2se/1.5/docs/guide/intl/encoding.doc.html.
- Reply To
- The parameter is a comma separated list of the "Reply To" addresses.
If this parameter is not set the replyTo Entry Attribute
is mapped. This parameter is optional.
- Debug
- Turns on debug messages. This parameter is globally defined
for all TDI components