content
The content
MultiPartEmail, SimpleEmailDescription: The base class for all email messages. This class sets the sender's email name, receiver's email name, subject, and the sent date. Subclasses are responsible for setting the message body.
Title:首亨软件 - TSS/CRM等
static final Stringprotected jakarta.mail.AuthenticatorAuthenticator object that will be used
when authentication is requested from the mail server.protected Listprotected Stringprotected Listprotected Stringprotected Objectstatic final Stringprotected Stringprotected booleanstatic final Stringstatic final Stringprotected jakarta.mail.internet.MimeMultipartstatic final Stringprotected jakarta.mail.internet.InternetAddressprotected Mapprotected Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected jakarta.mail.internet.MimeMessageprotected booleanprotected Stringprotected Stringprotected Stringstatic final Stringstatic final Stringprotected Liststatic final Stringstatic final Stringprotected Datestatic final Stringprotected Stringprotected intprotected intprotected booleanprotected Stringprotected Stringstatic final Stringstatic final Stringprotected booleanprotected Liststatic final StringvoidaddReplyTo(String email) addReplyTo(String email,
String name) addReplyTo(String email,
String name,
String charset) voidprotected jakarta.mail.internet.MimeMessagecreateMimeMessage(jakarta.mail.Session aSession) jakarta.mail.internet.InternetAddressjakarta.mail.Sessionjakarta.mail.internet.MimeMessageintintbooleanisSSL()booleanisTLS()voidsend()voidsetAuthentication(String userName,
String password) voidsetAuthenticator(jakarta.mail.Authenticator newAuthenticator) Authenticator to be used when authentication
is requested from the mail server.setBcc(Collection aCollection) setBounceAddress(String email) setCc(Collection aCollection) voidsetCharset(String newCharset) voidsetContent(jakarta.mail.internet.MimeMultipart aMimeMultipart) voidsetContent(Object aObject,
String aContentType) voidsetDebug(boolean d) voidsetHeaders(Map map) voidsetHostName(String aHostName) voidsetMailSession(jakarta.mail.Session aSession) voidsetMailSessionFromJNDI(String jndiName) abstract EmailvoidsetPopBeforeSmtp(boolean newPopBeforeSmtp,
String newPopHost,
String newPopUsername,
String newPopPassword) setReplyTo(Collection aCollection) voidsetSentDate(Date date) voidsetSmtpPort(int aPortNumber) voidsetSocketConnectionTimeout(int socketConnectionTimeout) voidsetSocketTimeout(int socketTimeout) voidsetSSL(boolean ssl) voidsetSslSmtpPort(String sslSmtpPort) setSubject(String aSubject) voidsetTLS(boolean withTLS) setTo(Collection aCollection) protected jakarta.mail.internet.InternetAddress[]toInternetAddressArray(List list) voidupdateContentType(String aContentType) Authenticator object that will be used
when authentication is requested from the mail server.String
rather than InternetAddress.d - A boolean.
This method will create a new instance of
DefaultAuthenticator using the supplied parameters.
userName - User name for the SMTP serverpassword - password for the SMTP serverAuthenticator to be used when authentication
is requested from the mail server.
This method should be used when your outgoing mail server requires authentication. Your mail server must also support RFC2554.
newAuthenticator - the Authenticator object.AuthenticatornewCharset - A String.IllegalCharsetNameException - if the charset name is invalidUnsupportedCharsetException - if no support for the named charset
exists in the current JVMaMimeMultipart - aMimeMultipartaObject - aObjectaContentType - aContentTypeaContentType - aContentTypeaHostName - aHostNamewithTLS - true if TLS needed, false otherwiseaPortNumber - aPortNumberaSession - mail session to be usedjndiName - name of JNDI ressource (javax.mail.Session type), ressource
if searched in java:comp/env if name dont start with "java:"IllegalArgumentException - JNDI name null or emptyNamingException - ressource can be retrieved from JNDI directoryEmailException - thrown when host name was not set.setCharset().
If it is not set, it will be encoded using
the Java platform's default charset (UTF-16) if it contains
non-ASCII characters; otherwise, it is used as is.email - A String.EmailException - Indicates an invalid email address.setCharset().
If it is not set, it will be encoded using
the Java platform's default charset (UTF-16) if it contains
non-ASCII characters; otherwise, it is used as is.email - A String.name - A String.EmailException - Indicates an invalid email address.email - A String.name - A String.charset - The charset to encode the name with.EmailException - Indicates an invalid email address or charset.setCharset().
If it is not set, it will be encoded using
the Java platform's default charset (UTF-16) if it contains
non-ASCII characters; otherwise, it is used as is.email - A String.EmailException - Indicates an invalid email address.setCharset().
If it is not set, it will be encoded using
the Java platform's default charset (UTF-16) if it contains
non-ASCII characters; otherwise, it is used as is.email - A String.name - A String.EmailException - Indicates an invalid email address.email - A String.name - A String.charset - The charset to encode the name with.EmailException - Indicates an invalid email address or charset.Collection are expected to be of type
java.mail.internet.InternetAddress.aCollection - collection of InternetAddress objects.EmailException - Indicates an invalid email address.javax.mail.internet.InternetAddresssetCharset().
If it is not set, it will be encoded using
the Java platform's default charset (UTF-16) if it contains
non-ASCII characters; otherwise, it is used as is.email - A String.EmailException - Indicates an invalid email address.setCharset().
If it is not set, it will be encoded using
the Java platform's default charset (UTF-16) if it contains
non-ASCII characters; otherwise, it is used as is.email - A String.name - A String.EmailException - Indicates an invalid email address.email - A String.name - A String.charset - The charset to encode the name with.EmailException - Indicates an invalid email address or charset.Collection are expected to be of type
java.mail.internet.InternetAddress.aCollection - collection of InternetAddress objects.EmailException - Indicates an invalid email address.javax.mail.internet.InternetAddresssetCharset().
If it is not set, it will be encoded using
the Java platform's default charset (UTF-16) if it contains
non-ASCII characters; otherwise, it is used as is.email - A String.EmailException - Indicates an invalid email addresssetCharset().
If it is not set, it will be encoded using
the Java platform's default charset (UTF-16) if it contains
non-ASCII characters; otherwise, it is used as is.email - A String.name - A String.EmailException - Indicates an invalid email addressemail - A String.name - A String.charset - The charset to encode the name with.EmailException - Indicates an invalid email addressCollection are expected to be of type
java.mail.internet.InternetAddress.aCollection - collection of InternetAddress objectsEmailException - Indicates an invalid email addressjavax.mail.internet.InternetAddresssetCharset().
If it is not set, it will be encoded using
the Java platform's default charset (UTF-16) if it contains
non-ASCII characters; otherwise, it is used as is.email - A String.EmailException - Indicates an invalid email addresssetCharset().
If it is not set, it will be encoded using
the Java platform's default charset (UTF-16) if it contains
non-ASCII characters; otherwise, it is used as is.email - A String.name - A String.EmailException - Indicates an invalid email addressemail - A String.name - A String.charset - The charset to encode the name with.EmailException - Indicates an invalid email address or charset.Collection are expected to be of type
java.mail.internet.InternetAddress.aCollection - collection of InternetAddress objectsEmailException - Indicates an invalid email addressjavax.mail.internet.InternetAddressmap - A Map.name - A String with the name.value - A String with the value.aSubject - A String.email - A String.msg - A String.EmailException - generic exception.EmailException - if there was an error.aSession - mail session to be usedEmailException - the sending failedEmailException - the sending faileddate - Date to use as the sent date on the emaillist - A List.newPopBeforeSmtp - Wether or not to log into pop3
server before sending mail.newPopHost - The pop3 host to use.newPopUsername - The pop3 username.newPopPassword - The pop3 password.ssl - whether to enable the SSL transportsslSmtpPort - the SSL port to use for the SMTP transportsocketConnectionTimeout - the connection timeoutsocketTimeout - the socket I/O timeout