Package org.apache.commons.mail
Class EmailConstants
- java.lang.Object
-
- org.apache.commons.mail.EmailConstants
-
public final class EmailConstants extends Object
Constants used by Email classes. A description of the mail session parameter you find at http://java.sun.com/products/javamail/javadocs/com/sun/mail/smtp/package-summary.html.- Since:
- 1.3
-
-
Field Summary
Fields Modifier and Type Field Description static StringATTACHMENTSDeprecated.since 1.3, not in use since 1.0static StringCONTENT_TYPEDeprecated.since 1.3, not in use since 1.0static StringEMAIL_BODYDeprecated.since 1.3, not in use since 1.0static StringEMAIL_SUBJECTDeprecated.since 1.3, not in use since 1.0static StringFILE_SERVERDeprecated.since 1.3, not in use since 1.0static StringISO_8859_1charset constant for iso-8859-1static StringKOI8_Rcharset constant for koi8-rstatic StringMAIL_DEBUGThe debug mode to be used.static StringMAIL_FROMThe from email address.static StringMAIL_HOSTThe host name of the mail server.static StringMAIL_MIME_CHARSETDefines the default mime charset to use when none has been specified for the message.static StringMAIL_PORTThe port number of the mail server.static StringMAIL_SMTP_AUTHIf set to true, tries to authenticate the user using the AUTH command.static StringMAIL_SMTP_CONNECTIONTIMEOUTSocket connection timeout value in milliseconds.static StringMAIL_SMTP_FROMThe email address to use for SMTP MAIL command.static StringMAIL_SMTP_PASSWORDThe SMTP password.static StringMAIL_SMTP_SEND_PARTIALIf set to true, and a message has some valid and some invalid addresses, send the message anyway, reporting the partial failure with a SendFailedException.static StringMAIL_SMTP_SOCKET_FACTORY_CLASSSpecifies theSocketFactoryclass to create smtp sockets.static StringMAIL_SMTP_SOCKET_FACTORY_FALLBACKWhether to useSocketas a fallback if the initial connection fails or not.static StringMAIL_SMTP_SOCKET_FACTORY_PORTSpecifies the port to connect to when using a socket factory.static StringMAIL_SMTP_SSL_CHECKSERVERIDENTITYIf set to true, check the server identity as specified in RFC 2595.static StringMAIL_SMTP_SSL_ENABLEIf set to true, use SSL to connect and use the SSL port by default.static StringMAIL_SMTP_SSL_SOCKET_FACTORY_CLASSSpecifies theSSLSocketFactoryclass to use to create SMTP SSL sockets.static StringMAIL_SMTP_SSL_SOCKET_FACTORY_PORTSpecifies the port to connect to when using the SMTP SSL socket factory.static StringMAIL_SMTP_TIMEOUTSocket I/O timeout value in milliseconds.static StringMAIL_SMTP_USERThe SMTP user name.static StringMAIL_SMTPS_SEND_PARTIALIf set to true, and a message has some valid and some invalid addresses, send the message anyway, reporting the partial failure with a SendFailedException.static StringMAIL_TRANSPORT_PROTOCOLSpecifies the default transport protocolstatic StringMAIL_TRANSPORT_STARTTLS_ENABLEIndicates if the STARTTLS command shall be used to initiate a TLS-secured connection.static StringMAIL_TRANSPORT_STARTTLS_REQUIREDIf true, requires the use of the STARTTLS command.static StringMAIL_TRANSPORT_TLSDeprecated.since 1.3static StringRECEIVER_EMAILDeprecated.since 1.3, not in use since 1.0static StringRECEIVER_NAMEDeprecated.since 1.3, not in use since 1.0static StringSENDER_EMAILDeprecated.since 1.3, not in use since 1.0static StringSENDER_NAMEDeprecated.since 1.3, not in use since 1.0static StringSMTPthe value to use SMTP as transport protocolstatic intSOCKET_TIMEOUT_MSDefault socket timeout.static StringTEXT_HTMLdefines the text/html content typestatic StringTEXT_PLAINdefines the text/plain content typestatic StringTEXT_SUBTYPE_HTMLdefines the html subtypestatic StringUS_ASCIIcharset constant for us-asciistatic StringUTF_8charset constant for utf-8
-
-
-
Field Detail
-
SENDER_EMAIL
@Deprecated public static final String SENDER_EMAIL
Deprecated.since 1.3, not in use since 1.0- See Also:
- Constant Field Values
-
SENDER_NAME
@Deprecated public static final String SENDER_NAME
Deprecated.since 1.3, not in use since 1.0- See Also:
- Constant Field Values
-
RECEIVER_EMAIL
@Deprecated public static final String RECEIVER_EMAIL
Deprecated.since 1.3, not in use since 1.0- See Also:
- Constant Field Values
-
RECEIVER_NAME
@Deprecated public static final String RECEIVER_NAME
Deprecated.since 1.3, not in use since 1.0- See Also:
- Constant Field Values
-
EMAIL_SUBJECT
@Deprecated public static final String EMAIL_SUBJECT
Deprecated.since 1.3, not in use since 1.0- See Also:
- Constant Field Values
-
EMAIL_BODY
@Deprecated public static final String EMAIL_BODY
Deprecated.since 1.3, not in use since 1.0- See Also:
- Constant Field Values
-
CONTENT_TYPE
@Deprecated public static final String CONTENT_TYPE
Deprecated.since 1.3, not in use since 1.0- See Also:
- Constant Field Values
-
ATTACHMENTS
@Deprecated public static final String ATTACHMENTS
Deprecated.since 1.3, not in use since 1.0- See Also:
- Constant Field Values
-
FILE_SERVER
@Deprecated public static final String FILE_SERVER
Deprecated.since 1.3, not in use since 1.0- See Also:
- Constant Field Values
-
KOI8_R
public static final String KOI8_R
charset constant for koi8-r- See Also:
- Constant Field Values
-
ISO_8859_1
public static final String ISO_8859_1
charset constant for iso-8859-1- See Also:
- Constant Field Values
-
US_ASCII
public static final String US_ASCII
charset constant for us-ascii- See Also:
- Constant Field Values
-
UTF_8
public static final String UTF_8
charset constant for utf-8- See Also:
- Constant Field Values
-
MAIL_DEBUG
public static final String MAIL_DEBUG
The debug mode to be used.- See Also:
- Constant Field Values
-
MAIL_HOST
public static final String MAIL_HOST
The host name of the mail server.- See Also:
- Constant Field Values
-
MAIL_PORT
public static final String MAIL_PORT
The port number of the mail server.- See Also:
- Constant Field Values
-
MAIL_SMTP_FROM
public static final String MAIL_SMTP_FROM
The email address to use for SMTP MAIL command.- See Also:
- Constant Field Values
-
MAIL_SMTP_AUTH
public static final String MAIL_SMTP_AUTH
If set to true, tries to authenticate the user using the AUTH command.- See Also:
- Constant Field Values
-
MAIL_SMTP_USER
public static final String MAIL_SMTP_USER
The SMTP user name.- See Also:
- Constant Field Values
-
MAIL_SMTP_PASSWORD
public static final String MAIL_SMTP_PASSWORD
The SMTP password.- See Also:
- Constant Field Values
-
MAIL_TRANSPORT_PROTOCOL
public static final String MAIL_TRANSPORT_PROTOCOL
Specifies the default transport protocol- See Also:
- Constant Field Values
-
SMTP
public static final String SMTP
the value to use SMTP as transport protocol- See Also:
- Constant Field Values
-
TEXT_HTML
public static final String TEXT_HTML
defines the text/html content type- See Also:
- Constant Field Values
-
TEXT_SUBTYPE_HTML
public static final String TEXT_SUBTYPE_HTML
defines the html subtype- See Also:
- Constant Field Values
-
TEXT_PLAIN
public static final String TEXT_PLAIN
defines the text/plain content type- See Also:
- Constant Field Values
-
MAIL_TRANSPORT_TLS
@Deprecated public static final String MAIL_TRANSPORT_TLS
Deprecated.since 1.3- See Also:
- Constant Field Values
-
MAIL_TRANSPORT_STARTTLS_ENABLE
public static final String MAIL_TRANSPORT_STARTTLS_ENABLE
Indicates if the STARTTLS command shall be used to initiate a TLS-secured connection.- Since:
- 1.1
- See Also:
- Constant Field Values
-
MAIL_SMTP_SOCKET_FACTORY_FALLBACK
public static final String MAIL_SMTP_SOCKET_FACTORY_FALLBACK
Whether to useSocketas a fallback if the initial connection fails or not.- Since:
- 1.1
- See Also:
- Constant Field Values
-
MAIL_SMTP_SOCKET_FACTORY_CLASS
public static final String MAIL_SMTP_SOCKET_FACTORY_CLASS
Specifies theSocketFactoryclass to create smtp sockets.- Since:
- 1.1
- See Also:
- Constant Field Values
-
MAIL_SMTP_SOCKET_FACTORY_PORT
public static final String MAIL_SMTP_SOCKET_FACTORY_PORT
Specifies the port to connect to when using a socket factory.- Since:
- 1.1
- See Also:
- Constant Field Values
-
MAIL_SMTP_CONNECTIONTIMEOUT
public static final String MAIL_SMTP_CONNECTIONTIMEOUT
Socket connection timeout value in milliseconds. Default is infinite timeout.- Since:
- 1.2
- See Also:
- Constant Field Values
-
MAIL_SMTP_TIMEOUT
public static final String MAIL_SMTP_TIMEOUT
Socket I/O timeout value in milliseconds. Default is infinite timeout.- Since:
- 1.2
- See Also:
- Constant Field Values
-
SOCKET_TIMEOUT_MS
public static final int SOCKET_TIMEOUT_MS
Default socket timeout.- Since:
- 1.3
- See Also:
- Constant Field Values
-
MAIL_TRANSPORT_STARTTLS_REQUIRED
public static final String MAIL_TRANSPORT_STARTTLS_REQUIRED
If true, requires the use of the STARTTLS command. If the server doesn't support the STARTTLS command, the connection will fail.- Since:
- 1.3
- See Also:
- Constant Field Values
-
MAIL_SMTP_SSL_ENABLE
public static final String MAIL_SMTP_SSL_ENABLE
If set to true, use SSL to connect and use the SSL port by default.- Since:
- 1.3
- See Also:
- Constant Field Values
-
MAIL_SMTP_SSL_CHECKSERVERIDENTITY
public static final String MAIL_SMTP_SSL_CHECKSERVERIDENTITY
If set to true, check the server identity as specified in RFC 2595.- Since:
- 1.3
- See Also:
- Constant Field Values
-
MAIL_SMTP_SSL_SOCKET_FACTORY_CLASS
public static final String MAIL_SMTP_SSL_SOCKET_FACTORY_CLASS
Specifies theSSLSocketFactoryclass to use to create SMTP SSL sockets.- Since:
- 1.3
- See Also:
- Constant Field Values
-
MAIL_SMTP_SSL_SOCKET_FACTORY_PORT
public static final String MAIL_SMTP_SSL_SOCKET_FACTORY_PORT
Specifies the port to connect to when using the SMTP SSL socket factory.- Since:
- 1.3
- See Also:
- Constant Field Values
-
MAIL_SMTP_SEND_PARTIAL
public static final String MAIL_SMTP_SEND_PARTIAL
If set to true, and a 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.- Since:
- 1.3.2
- See Also:
- Constant Field Values
-
MAIL_SMTPS_SEND_PARTIAL
public static final String MAIL_SMTPS_SEND_PARTIAL
If set to true, and a 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.- Since:
- 1.3.2
- See Also:
- Constant Field Values
-
MAIL_MIME_CHARSET
public static final String MAIL_MIME_CHARSET
Defines the default mime charset to use when none has been specified for the message.- Since:
- 1.3.2
- See Also:
- Constant Field Values
-
MAIL_FROM
public static final String MAIL_FROM
The from email address.- Since:
- 1.4
- See Also:
- Constant Field Values
-
-