Methods Summary |
---|
public boolean | getAllow8bitMIME()Is use of the 8BITMIME extension is allowed?
return allow8bitMIME;
|
java.lang.String | getDSNNotify()Return notification options as an RFC 1891 string.
Returns null if no options set.
if (notifyOptions == 0)
return null;
if (notifyOptions == NOTIFY_NEVER)
return "NEVER";
StringBuffer sb = new StringBuffer();
if ((notifyOptions & NOTIFY_SUCCESS) != 0)
sb.append("SUCCESS");
if ((notifyOptions & NOTIFY_FAILURE) != 0) {
if (sb.length() != 0)
sb.append(',");
sb.append("FAILURE");
}
if ((notifyOptions & NOTIFY_DELAY) != 0) {
if (sb.length() != 0)
sb.append(',");
sb.append("DELAY");
}
return sb.toString();
|
java.lang.String | getDSNRet()Return return option as an RFC 1891 string.
Returns null if no option set.
return returnOptionString[returnOption];
|
public java.lang.String | getEnvelopeFrom()Return the envelope From address.
return envelopeFrom;
|
public java.lang.String | getMailExtension()Gets the extension string to use with the MAIL command.
return extension;
|
public int | getNotifyOptions()Get notification options. Returns zero if no options set.
return notifyOptions;
|
public int | getReturnOption()Return return option. Returns zero if no option set.
return returnOption;
|
public boolean | getSendPartial()Send message if some addresses are invalid?
return sendPartial;
|
public java.lang.String | getSubmitter()Gets the submitter to be used for the RFC 2554 AUTH= value
in the MAIL FROM command.
return submitter;
|
public void | setAllow8bitMIME(boolean allow)If set to true, and the server supports the 8BITMIME extension, text
parts of this message that use the "quoted-printable" or "base64"
encodings are converted to use "8bit" encoding if they follow the
RFC 2045 rules for 8bit text.
If true, overrides the mail.smtp.allow8bitmime property.
allow8bitMIME = allow;
|
public void | setEnvelopeFrom(java.lang.String from)Set the From address to appear in the SMTP envelope. Note that this
is different than the From address that appears in the message itself.
The envelope From address is typically used when reporting errors.
See RFC 821 for
details.
If set, overrides the mail.smtp.from property.
envelopeFrom = from;
|
public void | setMailExtension(java.lang.String extension)Set the extension string to use with the MAIL command.
The extension string can be used to specify standard SMTP
service extensions as well as vendor-specific extensions.
Typically the application should use the
{@link com.sun.mail.smtp.SMTPTransport SMTPTransport}
method {@link com.sun.mail.smtp.SMTPTransport#supportsExtension
supportsExtension}
to verify that the server supports the desired service extension.
See RFC 1869
and other RFCs that define specific extensions.
For example:
if (smtpTransport.supportsExtension("DELIVERBY"))
smtpMsg.setMailExtension("BY=60;R");
this.extension = extension;
|
public void | setNotifyOptions(int options)Set notification options to be used if the server supports
Delivery Status Notification
(RFC 1891).
Either NOTIFY_NEVER or some combination of
NOTIFY_SUCCESS , NOTIFY_FAILURE , and
NOTIFY_DELAY .
If set, overrides the mail.smtp.dsn.notify property.
if (options < -1 || options >= 8)
throw new IllegalArgumentException("Bad return option");
notifyOptions = options;
|
public void | setReturnOption(int option)Set return option to be used if server supports
Delivery Status Notification
(RFC 1891).
Either RETURN_FULL or RETURN_HDRS .
If set, overrides the mail.smtp.dsn.ret property.
if (option < 0 || option > RETURN_HDRS)
throw new IllegalArgumentException("Bad return option");
returnOption = option;
|
public void | setSendPartial(boolean partial)If set to true, and this message has some valid and some invalid
addresses, send the message anyway, reporting the partial failure with
a SendFailedException. If set to false (the default), the message is
not sent to any of the recipients if there is an invalid recipient
address.
If true, overrides the mail.smtp.sendpartial property.
sendPartial = partial;
|
public void | setSubmitter(java.lang.String submitter)Sets the submitter to be used for the RFC 2554 AUTH= value
in the MAIL FROM command. Normally only used by a server
that's relaying a message. Clients will typically not
set a submitter. See
RFC 2554
for details.
this.submitter = submitter;
|