com.infoengine.webject.msg
Class SendMail
java.lang.Object
com.infoengine.webject.Webject
com.infoengine.webject.msg.SendMail
- public class SendMail
- extends Webject
The SendMail webject sends an e-mail message to a list of recipients. The
webject accepts the following parameters:
FROM The e-mail address defining the originator of the message.
If this parameter is not specified, the originator address
is obtained from the property com.infoengine.mail.originator.
If the property does not exist, and FROM is not specified,
an exception is thrown.
REPLY_TO The e-mail address(es) defining where replies should be sent
(optional).
TO The e-mail address(es) of the primary recipient(s) of the
message (required).
CC The e-mail address(es) of the copy recipient(s) of the
message (optional).
BCC The e-mail address(es) of the blind copy recipient(s) of the
message (optional).
SUBJECT The subject field of the message (optional).
HEADERS_CHARSET The character set/encoding used in the message headers
(optional, default is platform default encoding).
CONTENT The message content(s) (optional).
CONTENT_TYPE The MIME content type of the content(s) (optional, default
is text/plain).
CONTENT_URL The URL(s) of resources to read for message content(s)
(optional).
CONTENT_URL_LANGUAGE The language(s) (HTTP Accept-Language header values)
associated with the CONTENT_URL parameter(s).
DBUSER The username to specify when authenticating to the web
server when opening the URL(s) specified by CONTENT_URL.
PASSWD The username to specify when authenticating to the web
server when opening the URL(s) specified by CONTENT_URL.
MULTIPART_TYPE The MIME subtype of the multipart message when multiple
CONTENT and/or CONTENT_URL parameter values are specified
(optional, default is "mixed").
BLOB_COUNT The number of BLOB's to read from the input stream and
append as attachments.
MAIL_SERVER The Internet domain name of the SMTP server. If this
parameter is not specified, the mail server name is obtained
from the property com.infoengine.mail.smtp.server. If the
property does not exist, localhost is used.
MAX_DELIVERY_TIME The maximum length of time in seconds to take in
attempting to deliver messages to valid addresses in cases
where the mail transport indicates that the addresses are
valid, but the mail server does not accept them (e.g.,
because the mail server is temporarily unavailable or
congested). The default is 60 seconds.
USERNAME The username to specify when authenticating to the SMTP
server. If this parameter is not specified, the username
is obtained from the property
com.infoengine.mail.smtp.username. If the property does not
exist, and USERNAME is not specified, an anonymous binding is
attempted.
PASSWORD The password to specify when authenticating to the SMTP
server. If this parameter is not specified, the password
is obtained from the property
com.infoengine.mail.smtp.password.
GROUP_OUT The optional name of an output group. If this parameter
is specified, then an output group will be returned containing
a single element with three attributes named "sent", "unsent",
and "invalid". The attribute named "sent" will specify the
addresses to which the message was sent, the attribute named
"unsent" will specify the addresses that are assumed to be
valid but to which the message could not be sent (e.g.,
because the mail server was unavailable), and the attribute
named "invalid" will specify the addresses that were invalid.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RESOURCE
private static final String RESOURCE
- See Also:
- Constant Field Values
maxDeliveryTime
private long maxDeliveryTime
SendMail
public SendMail()
invoke
public Task invoke(Task task)
throws IEException
- Send an e-mail message.
- Specified by:
invoke
in class Webject
- Parameters:
task
- a value of type 'Task'
- Returns:
- a value of type 'Task'
- Throws:
IEException
openURL
public static URLConnection openURL(String urlString,
Webject webject,
Task task,
String acceptLanguage)
throws IEException
- Throws:
IEException
getAuthElement
private static Element getAuthElement(Task task,
String url)