Difference between revisions of "GVMailServices"

From GreenVulcano Wiki
Jump to: navigation, search
(Created page with "==Description== The GVMailServices Adapters specifies the Email services configuration. The GVMailServices Element is used by: GVAdapters. The following table sho...")
 
(mail-service)
 
(4 intermediate revisions by the same user not shown)
Line 89: Line 89:
 
Might contain the sub-elements:
 
Might contain the sub-elements:
 
* [[Description]]
 
* [[Description]]
* [[smtp]]
+
* [[#smtp|smtp]]
* ([[pop3]] | [[imap]])
+
* ([[#pop3|pop3]] | [[#imap|imap]])
* [[mime]]
+
* [[#mime|mime]]
 +
 
 +
====smtp====
 +
 
 +
SMTP configuration parameters.
 +
 
 +
The smtp Element is used by: [[#mail-service|mail-service]].
 +
 
 +
The following table shows its attributes:
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| host || optional || The SMTP server to connect to.
 +
The attribute's value cannot be null.
 +
|-
 +
| port || optional || The SMTP server port to connect to, if the connect() method does not explicitly specify one.
 +
Defaults is "25".
 +
The attribute's value cannot be null.
 +
|-
 +
| connectiontimeout || optional || Socket connection timeout value in milliseconds.
 +
The Default is an infinite timeout.
 +
The attribute's value cannot be null.
 +
|-
 +
| timeout || optional || Socket I/O timeout value in milliseconds.
 +
The Default is an infinite timeout.
 +
The attribute's value cannot be null.
 +
|-
 +
| from || optional || Email address for SMTP MAIL command.
 +
It sets the envelope return address.
 +
Defaults to msg.getFrom() or InternetAddress.getLocalAddress().
 +
NOTE: mail.smtp.user was previously used for this.
 +
The attribute's value cannot be null.
 +
|-
 +
| localhost || optional || Local host name used in the SMTP HELO or EHLO command.
 +
Default is InetAddress.getLocalHost().getHostName().
 +
No need to be set if your JDK and your name service are properly configured.
 +
The attribute's value cannot be null.
 +
|-
 +
| localaddress || optional || Local address (host name) to bind when creating the SMTP socket.
 +
Default is to the address selected by the Socket class.
 +
No need to be set, but can be useful with multi-homed hosts where it's important to pick a particular local address to bind
 +
to.
 +
The attribute's value cannot be null.
 +
|-
 +
| localport || optional || Local port number to bind to when creating the SMTP socket.
 +
Default is to the port number picked by the Socket class.
 +
The attribute's value cannot be null.
 +
|-
 +
| ehlo || optional || If "false", do not attempt to sign on with the EHLO command.
 +
Default is "true".
 +
Failure of the EHLO command will fallback to the HELO command; this property exists only for servers that do not fail EHLO properly or do not implement EHLO properly.
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| auth || optional || If "true", authenticates the user using the AUTH command.
 +
Default is "false".
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| submitter || optional || This is the submitter to use in the AUTH tag in the MAIL FROM command.
 +
It's used by the mail relay to pass along information about the original submitter of the message.
 +
See also the setSubmitter method of SMTPMessage.
 +
Mail clients typically do not use this.
 +
The attribute's value cannot be null.
 +
|-
 +
| dsn-notify || optional || The NOTIFY option to the RCPT command.
 +
Either NEVER, or some combination of SUCCESS, FAILURE, and DELAY (separated by commas).
 +
The attribute's value cannot be null.
 +
|-
 +
| dsn-ret || optional || The RET option to the MAIL command. Either FULL or HDRS.
 +
The attribute's admitted values are:
 +
* FULL
 +
* HDRS
 +
The attribute's value cannot be null.
 +
|-
 +
| allow8bitmime || optional || If set to "true", and the server supports the 8BITMIME extension, text parts of messages that use the "quoted-printable" or "base64" encodings are converted to use "8bit" encoding if they follow the RFC2045 rules for 8bit text.
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| sendpartial || optional || If set to "true", and a message has some valid and invalid addresses, send the message anyway, reporting the partial failure with a SendFailedException.
 +
If set to "false" (default), the message is not sent to any of the recipients if there is an invalid recipient address.
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| sasl-realm || optional || The realm to use with DIGEST-MD5 authentication.
 +
The attribute's value cannot be null.
 +
|-
 +
| quitwait || optional || If set to "true", causes the transport to wait for the response to the QUIT command.
 +
If set to "false" (default), the QUIT command is sent and the connection is immediately closed.
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| reportsuccess || optional || If set to "true", causes the transport to include an SMTPAddressSucceededException for each address that is successful.
 +
This will cause a SendFailedException to be thrown from the sendMessage method of SMTPTransport even if all addresses were correct and the message was successfully sent.
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| socketFactory-class || optional || If set, specifies the name of a class that implements the javax.net.SocketFactory interface.
 +
This class will be used to create SMTP sockets.
 +
The attribute's value cannot be null.
 +
|-
 +
| socketFactory-fallback || optional || If set to "true", failure to create a socket using the specified socket factory class will cause the socket to be created using the java.net.Socket class.
 +
The Default is "true".
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| socketFactory-port || optional || Specifies the port to connect to when using the specified socket factory.
 +
If not set, the default port will be used.
 +
The attribute's value cannot be null.
 +
|-
 +
| mailextension || optional || Extension string to append to the MAIL command.
 +
The extension string can be used to specify standard SMTP service extensions as well as vendor-specific extensions.
 +
The application should use the SMTPTransport method supportsExtension to verify that the server supports the desired service extension.
 +
See RFC 1869 and other RFCs that define specific extensions.
 +
The attribute's value cannot be null.
 +
|}
 +
 
 +
Might contain the sub-elements:
 +
* [[Description]]
 +
 
 +
 
 +
====pop3====
 +
 
 +
This element represents the POP3 configuration parameters.
 +
 
 +
The '''pop3''' Element is used by: [[#mail-service|mail-service]].
 +
 
 +
The following table shows its attributes:
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| host || optional || The POP3 server to connect to.
 +
The attribute's value cannot be null.
 +
|-
 +
| port || optional || The POP3 server port to connect to, if the connect() method does not explicitly specify one.
 +
Default is 110.
 +
The attribute's value cannot be null.
 +
|-
 +
| connectiontimeout || optional || Socket connection timeout value in milliseconds.
 +
The Default is an infinite timeout.
 +
The attribute's value cannot be null.
 +
|-
 +
| timeout || optional || Socket I/O timeout value in milliseconds.
 +
The Default is an infinite timeout.
 +
The attribute's value cannot be null.
 +
|-
 +
| rsetbeforequit || optional || Send a POP3 RSET command when closing the folder, before sending the QUIT command.
 +
Useful with POP3 servers that implicitly mark all messages that are read as "deleted"; this will prevent such messages from being deleted and expunged unless the client requests so.
 +
Default is "false".
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| message-class || optional || Class name of a subclass of com.sun.mail.pop3.POP3Message.
 +
The subclass can be used to handle a non-standard Content-Type headers.
 +
The subclass must have a public constructor of the form MyPOP3Message(Folder f, int msgno) throws MessagingException.
 +
The attribute's value cannot be null.
 +
|-
 +
| localaddress || optional || Local address (Hostname) to bind to when creating the POP3 socket.
 +
Defaults to the address picked by the Socket class.
 +
No need to be set, but useful with multi-homed hosts where it's important to pick a specific local address to bind to.
 +
The attribute's value cannot be null.
 +
|-
 +
| localport || optional || Local port number to bind to when creating the POP3 socket.
 +
Defaults to the port number picked by the Socket class.
 +
The attribute's value cannot be null.
 +
|-
 +
| apop-enable || optional || If set to "true", use APOP instead of USER/PASS to login to the POP3 server, if the POP3 server supports APOP.
 +
APOP sends a digest of the password rather than the clear text password.
 +
Default is "false".
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| socketFactory-class || optional || If set, specifies the name of a class that implements the javax.net.SocketFactory interface.
 +
This class will be used to create POP3 sockets.
 +
The attribute's value cannot be null.
 +
|-
 +
| socketFactory-fallback || optional || If set to "true", an error creating a socket using the specified socket factory class will cause the socket to be created using the java.net.Socket class.
 +
Default is "true".
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| socketFactory-port || optional || Specifies the port to connect to when using the specified socket factory.
 +
If not set, the default port will be used.
 +
The attribute's value cannot be null.
 +
|}
 +
 
 +
Might contain the sub-elements:
 +
* [[Description]]
 +
 
 +
 
 +
====imap====
 +
 
 +
Represents the IMAP configuration parameters.
 +
 
 +
The '''imap''' Element is used by: [[#mail-service|mail-service]].
 +
 
 +
The following table shows its attributes:
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| host || optional || The IMAP server to connect to.
 +
The attribute's value cannot be null.
 +
|-
 +
| port || optional || The IMAP server port to connect to, if the connect() method does not explicitly specify one.
 +
Default is 143.
 +
The attribute's value cannot be null.
 +
|-
 +
| partialfetch || optional || Controls whether the IMAP partial-fetch capability should be used.
 +
Default is "true".
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| fetchsize || optional || Partial fetch size in bytes.
 +
Default is 16Kb.
 +
The attribute's value cannot be null.
 +
|-
 +
| connectiontimeout || optional || Socket connection timeout value in milliseconds.
 +
The Default is an infinite timeout.
 +
The attribute's value cannot be null.
 +
|-
 +
| timeout || optional || Socket I/O timeout value in milliseconds.
 +
The Default is an infinite timeout.
 +
The attribute's value cannot be null.
 +
|-
 +
| statuscachetimeout || optional || Timeout value in milliseconds for cache of STATUS command response.
 +
Default is 1000 (1 second). Zero disables cache.
 +
The attribute's value cannot be null.
 +
|-
 +
| appendbuffersize || optional || Maximum size of a message to buffer in memory when appending to an IMAP folder.
 +
If not set, or set to "-1", there is no maximum and all messages are buffered.
 +
If set to "0", no message is buffered.
 +
If set to (for example) "8192", messages of 8Kb or less are buffered, larger messages are not buffered.
 +
Buffering saves cpu time at the expense of short term memory usage.
 +
If you commonly append very large messages to IMAP mailboxes you might want to set this to a moderate value (1Mb or less).
 +
The attribute's value cannot be null.
 +
|-
 +
| connectionpoolsize || optional || Maximum number of available connections in the connection pool.
 +
The Default is "1".
 +
The attribute's value cannot be null.
 +
|-
 +
| connectionpooltimeout || optional || Timeout value in milliseconds for connection pool connections.
 +
Default is set to "45000" (45 seconds).
 +
The attribute's value cannot be null.
 +
|-
 +
| separatestoreconnection || optional || Flag to indicate whether to use a dedicated store connection for store commands.
 +
Default is "false".
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| allowreadonlyselect || optional || If "false", when opening a folder read / write will get an error if the SELECT command succeeds but indicates that the folder is READ-ONLY.
 +
This sometimes indicates that the folder contents can NOT be changed, but the flags are per-user and can be changed, such as might be the case for public shared folders.
 +
If set to "true", such open attempts will succeed, allowing the flags to be changed.
 +
The getMode method on the Folder object will return Folder.READ_ONLY in this case even though the open method specified is Folder.READ_WRITE.
 +
The Default is "false".
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| auth-login-disable || optional || If "true", prevents the use of the non-standard AUTHENTICATE LOGIN command, instead using the
 +
plain LOGIN command.
 +
The Default is "false".
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| auth-plain-disable || optional || If "true", prevents use of the AUTHENTICATE PLAIN command.
 +
Default is "false".
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| starttls-enable || optional || If "true", enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands.
 +
Note that an appropriate trust store must configured so that the client will trust the server's certificate.
 +
This feature only works on J2SE 1.4 and newer systems.
 +
Default is "false".
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| localaddress || optional || Local address (host name) to bind to when creating the IMAP socket.
 +
Defaults to the address picked by the Socket class.
 +
Should not normally need to be set, but useful with multi-homed hosts where it's important to pick a particular local address to bind to.
 +
The attribute's value cannot be null.
 +
|-
 +
| localport || optional || Local port number to bind to when creating the IMAP socket.
 +
Defaults to the port number picked by the Socket class.
 +
The attribute's value cannot be null.
 +
|-
 +
| sasl-enable || optional || If set to "true", attempt to use the javax.security.sasl package to choose an authentication mechanism for login. Defaults to "false".
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| sasl-mechanisms || optional || A space or comma separated list of SASL mechanism names to try to use.
 +
The attribute's value cannot be null.
 +
|-
 +
| sasl-authorizationid || optional || The authorization ID to use in the SASL authentication.
 +
If not set, the authetication ID (user name) is used.
 +
The attribute's value cannot be null.
 +
|-
 +
| socketFactory-class || optional || If set, specifies the name of a class that implements the javax.net.SocketFactory interface.
 +
This class will be used to create IMAP sockets.
 +
The attribute's value cannot be null.
 +
|-
 +
| socketFactory-fallback || optional || If set to "true", failure to create a socket using the specified socket factory class will cause the socket to be created using the java.net.Socket class. Defaults to "true".
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| socketFactory-port || optional || Specifies the port to connect to when using the specified socket factory.
 +
If not set, the default port will be used.
 +
The attribute's value cannot be null.
 +
|}
 +
 
 +
Might contain the sub-elements:
 +
* [[Description]]
 +
 
 +
====mime====
 +
 
 +
Represents the MIME mail configuration parameters.
 +
 
 +
The '''mime''' Element is used by: [[#mail-service|mail-service]].
 +
 
 +
The following table shows its attributes:
 +
{|class="gvtable"
 +
! Attribute !! Type !! Description
 +
|-
 +
| address-strict || optional || The mail.mime.address.strict session property controls the parsing of address headers.
 +
By default, strict parsing of address headers is done.
 +
If this property is set to "false", strict parsing is not done and many illegal addresses that sometimes occur in real messages are allowed. See the InternetAddress class for details.
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| charset || optional || The mail.mime.charset System property can be used to specify the default MIME charset to use for encoded words and text parts that don't otherwise specify a charset.
 +
Normally, the default MIME charset is derived from the default Java charset, as specified in the file.encoding System property.
 +
Most applications will have no need to explicitly set the default MIME charset.
 +
In cases where the default MIME charset to be used for mail messages is different than the charset used for files stored on
 +
the system, this property should be setted.
 +
The attribute's value cannot be null.
 +
|-
 +
| decodetext-strict || optional || The mail.mime.decodetext.strict property controls decoding of MIME encoded words.
 +
The MIME spec requires that encoded words start at the beginning of a whitespace separated word.
 +
Some mailers incorrectly include encoded words in the middle of a word.
 +
If the mail.mime.decodetext.strict System property is set to "false", an attempt will be made to decode these illegal encoded words.
 +
The default is "true".
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| encodeeol-strict || optional || The mail.mime.encodeeol.strict property controls the choice of Content-Transfer-Encoding for MIME parts that are not of type "text".
 +
Often such parts will contain textual data for which an encoding that allows normal end of line conventions is appropriate. In rare cases, such a part will appear to contain entirely textual data, but will require an encoding that preserves CR and LF characters without change.
 +
If the mail.mime.encodeeol.strict System property is set to "true", such an encoding will be used when necessary.
 +
The default is "false".
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| base64-ignoreerrors || optional || If set to "true", the BASE64 decoder will ignore errors in the encoded data, returning EOF.
 +
This may be useful when dealing with improperly encoded messages that contain extraneous data at the end of the encoded stream. Note however that errors anywhere in the stream will cause the decoder to stop decoding so this should be used with extreme caution.
 +
The default is "false".
 +
This property is supported by Sun's implementation of JavaMail, but is not currently a required part of the specification.
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| foldtext || optional || If set to "true", header fields containing just text such as the Subject and Content-Description header fields, and long parameter values in structured headers such as Content-Type will be folded (broken into 76 character lines) when set and unfolded when read.
 +
The default is "true".
 +
This property is supported by Sun's implementation of JavaMail, but is not currently a required part of the specification.
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| setcontenttypefilename || optional || If set to "true", the setFileName method will also set the name parameter on the Content-Type header to the specified filename. This supports interoperability with some old mail clients.
 +
The default is "true".
 +
This property is supported by Sun's implementation of JavaMail, but is not currently a required part of the specification.
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| setdefaulttextcharset || optional || When updating the headers of a message, a body part with a text content type but no charset parameter will have a charset parameter added to it if this property is set to "true".
 +
The default is "true".
 +
This property is supported by Sun's implementation of JavaMail, but is not currently a required part of the specification.
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|-
 +
| multipart-ignoremissingendboundary || optional || When parsing a multipart MIME message, a message that is missing the final end boundary line is not considered as an error. The data simply ends at the end of the input.
 +
Note that messages of this form violate the MIME specification.
 +
If the property mail.mime.multipart.ignoremissingendboundary is setted to "false", such messages are considered an error and a
 +
MesagingException will be thrown when parsing such a message.
 +
This property is supported by Sun Microsystem implementation of JavaMail, but is not currently a required part of the specification.
 +
The attribute's admitted values are:
 +
* false
 +
* true
 +
The attribute's value cannot be null.
 +
|}
 +
 
 +
Might contain the sub-elements:
 +
* [[Description]]

Latest revision as of 07:00, 10 April 2012

Description

The GVMailServices Adapters specifies the Email services configuration.

The GVMailServices Element is used by: GVAdapters.

The following table shows its attributes:

Attribute Type Description
type fixed Element type 'module'.

This attribute must assume the value module.

name fixed Module id always set to 'MAIL_SERVICES'.

This attribute must assume the value MAIL_SERVICES.


Might contain the sub-elements:

mail-service

Specifies the Email service configuration.

The mail-service Element is used by: GVMailServices.

The following table shows its attributes:

Attribute Type Description
code fixed Specifies the Email service plugin.

This attribute must assume the value org.jboss.mail.MailService.

name required Specifies the Email service name.

ex: jboss:service=Mail The attribute's value can't be null.

jndi-name required Specifies the javax.mail.Session object JNDI name registered into the application server JNDI tree.

ex: java:/Mail The attribute's value can't be null.

host optional Specifies the default Mail server.

The Store and Transport object's connect methods use this property, if the protocolspecific host property is absent, to locate the target host. ex: smtp.nosuchhost.nosuchdomain.com The attribute's value cannot be null.

user required Specifies the username to provide when connecting to a Mail server.

The Store and Transport object's connect methods use this property, if the protocol specific username property is absent, to obtain the username. ex: nobody We assume that the authentication username is the same for each protocol. The attribute's value cannot be null.

password optional Specifies the password to provide when connecting to a Mail server.

This parameter is not included in the JavaMail specifications, but is used to configure the JBoss mail service. We assume that the authentication password is the same for each protocol. The attribute's value cannot be null.

from optional Specifies the return address of the current user.

Used by the InternetAddress.getLocalAddress method to specify the current user’s email address. ex: someone@host.domain.com The attribute's value can't be null.

debug optional Specifies the initial debugging mode.

Setting this property to "true" will turn on debug mode, while setting it to "false" turns debug mode off. The attribute's admitted values are:

  • false
  • true

The attribute's value can't be null.

alternates optional A string which contains additional email addresses to which current user is aware.

The MimeMessage reply method will eliminate any of these addresses from the recipient list in the message it builds, to avoid sending the reply back to the sender. This property is supported by Sun Microsystem implementation of JavaMail, but is not currently a required part of the specification. The attribute's value can't be null.

replyallcc optional If set to "true", the MimeMessage reply method will put all recipients except the original sender in the Cc list of the new message.

Normally, recipients in the "To" header of the original message will also appear in the "To" list of the new email message. This property is supported by Sun Microsystem implementation of JavaMail, but is not currently a required part of the specification. The attribute's admitted values are:

  • false
  • true

The attribute's value can't be null.

Might contain the sub-elements:

smtp

SMTP configuration parameters.

The smtp Element is used by: mail-service.

The following table shows its attributes:

Attribute Type Description
host optional The SMTP server to connect to.

The attribute's value cannot be null.

port optional The SMTP server port to connect to, if the connect() method does not explicitly specify one.

Defaults is "25". The attribute's value cannot be null.

connectiontimeout optional Socket connection timeout value in milliseconds.

The Default is an infinite timeout. The attribute's value cannot be null.

timeout optional Socket I/O timeout value in milliseconds.

The Default is an infinite timeout. The attribute's value cannot be null.

from optional Email address for SMTP MAIL command.

It sets the envelope return address. Defaults to msg.getFrom() or InternetAddress.getLocalAddress(). NOTE: mail.smtp.user was previously used for this. The attribute's value cannot be null.

localhost optional Local host name used in the SMTP HELO or EHLO command.

Default is InetAddress.getLocalHost().getHostName(). No need to be set if your JDK and your name service are properly configured. The attribute's value cannot be null.

localaddress optional Local address (host name) to bind when creating the SMTP socket.

Default is to the address selected by the Socket class. No need to be set, but can be useful with multi-homed hosts where it's important to pick a particular local address to bind to. The attribute's value cannot be null.

localport optional Local port number to bind to when creating the SMTP socket.

Default is to the port number picked by the Socket class. The attribute's value cannot be null.

ehlo optional If "false", do not attempt to sign on with the EHLO command.

Default is "true". Failure of the EHLO command will fallback to the HELO command; this property exists only for servers that do not fail EHLO properly or do not implement EHLO properly. The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

auth optional If "true", authenticates the user using the AUTH command.

Default is "false". The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

submitter optional This is the submitter to use in the AUTH tag in the MAIL FROM command.

It's used by the mail relay to pass along information about the original submitter of the message. See also the setSubmitter method of SMTPMessage. Mail clients typically do not use this. The attribute's value cannot be null.

dsn-notify optional The NOTIFY option to the RCPT command.

Either NEVER, or some combination of SUCCESS, FAILURE, and DELAY (separated by commas). The attribute's value cannot be null.

dsn-ret optional The RET option to the MAIL command. Either FULL or HDRS.

The attribute's admitted values are:

  • FULL
  • HDRS

The attribute's value cannot be null.

allow8bitmime optional If set to "true", and the server supports the 8BITMIME extension, text parts of messages that use the "quoted-printable" or "base64" encodings are converted to use "8bit" encoding if they follow the RFC2045 rules for 8bit text.

The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

sendpartial optional If set to "true", and a message has some valid and invalid addresses, send the message anyway, reporting the partial failure with a SendFailedException.

If set to "false" (default), the message is not sent to any of the recipients if there is an invalid recipient address. The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

sasl-realm optional The realm to use with DIGEST-MD5 authentication.

The attribute's value cannot be null.

quitwait optional If set to "true", causes the transport to wait for the response to the QUIT command.

If set to "false" (default), the QUIT command is sent and the connection is immediately closed. The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

reportsuccess optional If set to "true", causes the transport to include an SMTPAddressSucceededException for each address that is successful.

This will cause a SendFailedException to be thrown from the sendMessage method of SMTPTransport even if all addresses were correct and the message was successfully sent. The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

socketFactory-class optional If set, specifies the name of a class that implements the javax.net.SocketFactory interface.

This class will be used to create SMTP sockets. The attribute's value cannot be null.

socketFactory-fallback optional If set to "true", failure to create a socket using the specified socket factory class will cause the socket to be created using the java.net.Socket class.

The Default is "true". The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

socketFactory-port optional Specifies the port to connect to when using the specified socket factory.

If not set, the default port will be used. The attribute's value cannot be null.

mailextension optional Extension string to append to the MAIL command.

The extension string can be used to specify standard SMTP service extensions as well as vendor-specific extensions. The application should use the SMTPTransport method supportsExtension to verify that the server supports the desired service extension. See RFC 1869 and other RFCs that define specific extensions. The attribute's value cannot be null.

Might contain the sub-elements:


pop3

This element represents the POP3 configuration parameters.

The pop3 Element is used by: mail-service.

The following table shows its attributes:

Attribute Type Description
host optional The POP3 server to connect to.

The attribute's value cannot be null.

port optional The POP3 server port to connect to, if the connect() method does not explicitly specify one.

Default is 110. The attribute's value cannot be null.

connectiontimeout optional Socket connection timeout value in milliseconds.

The Default is an infinite timeout. The attribute's value cannot be null.

timeout optional Socket I/O timeout value in milliseconds.

The Default is an infinite timeout. The attribute's value cannot be null.

rsetbeforequit optional Send a POP3 RSET command when closing the folder, before sending the QUIT command.

Useful with POP3 servers that implicitly mark all messages that are read as "deleted"; this will prevent such messages from being deleted and expunged unless the client requests so. Default is "false". The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

message-class optional Class name of a subclass of com.sun.mail.pop3.POP3Message.

The subclass can be used to handle a non-standard Content-Type headers. The subclass must have a public constructor of the form MyPOP3Message(Folder f, int msgno) throws MessagingException. The attribute's value cannot be null.

localaddress optional Local address (Hostname) to bind to when creating the POP3 socket.

Defaults to the address picked by the Socket class. No need to be set, but useful with multi-homed hosts where it's important to pick a specific local address to bind to. The attribute's value cannot be null.

localport optional Local port number to bind to when creating the POP3 socket.

Defaults to the port number picked by the Socket class. The attribute's value cannot be null.

apop-enable optional If set to "true", use APOP instead of USER/PASS to login to the POP3 server, if the POP3 server supports APOP.

APOP sends a digest of the password rather than the clear text password. Default is "false". The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

socketFactory-class optional If set, specifies the name of a class that implements the javax.net.SocketFactory interface.

This class will be used to create POP3 sockets. The attribute's value cannot be null.

socketFactory-fallback optional If set to "true", an error creating a socket using the specified socket factory class will cause the socket to be created using the java.net.Socket class.

Default is "true". The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

socketFactory-port optional Specifies the port to connect to when using the specified socket factory.

If not set, the default port will be used. The attribute's value cannot be null.

Might contain the sub-elements:


imap

Represents the IMAP configuration parameters.

The imap Element is used by: mail-service.

The following table shows its attributes:

Attribute Type Description
host optional The IMAP server to connect to.

The attribute's value cannot be null.

port optional The IMAP server port to connect to, if the connect() method does not explicitly specify one.

Default is 143. The attribute's value cannot be null.

partialfetch optional Controls whether the IMAP partial-fetch capability should be used.

Default is "true". The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

fetchsize optional Partial fetch size in bytes.

Default is 16Kb. The attribute's value cannot be null.

connectiontimeout optional Socket connection timeout value in milliseconds.

The Default is an infinite timeout. The attribute's value cannot be null.

timeout optional Socket I/O timeout value in milliseconds.

The Default is an infinite timeout. The attribute's value cannot be null.

statuscachetimeout optional Timeout value in milliseconds for cache of STATUS command response.

Default is 1000 (1 second). Zero disables cache. The attribute's value cannot be null.

appendbuffersize optional Maximum size of a message to buffer in memory when appending to an IMAP folder.

If not set, or set to "-1", there is no maximum and all messages are buffered. If set to "0", no message is buffered. If set to (for example) "8192", messages of 8Kb or less are buffered, larger messages are not buffered. Buffering saves cpu time at the expense of short term memory usage. If you commonly append very large messages to IMAP mailboxes you might want to set this to a moderate value (1Mb or less). The attribute's value cannot be null.

connectionpoolsize optional Maximum number of available connections in the connection pool.

The Default is "1". The attribute's value cannot be null.

connectionpooltimeout optional Timeout value in milliseconds for connection pool connections.

Default is set to "45000" (45 seconds). The attribute's value cannot be null.

separatestoreconnection optional Flag to indicate whether to use a dedicated store connection for store commands.

Default is "false". The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

allowreadonlyselect optional If "false", when opening a folder read / write will get an error if the SELECT command succeeds but indicates that the folder is READ-ONLY.

This sometimes indicates that the folder contents can NOT be changed, but the flags are per-user and can be changed, such as might be the case for public shared folders. If set to "true", such open attempts will succeed, allowing the flags to be changed. The getMode method on the Folder object will return Folder.READ_ONLY in this case even though the open method specified is Folder.READ_WRITE. The Default is "false". The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

auth-login-disable optional If "true", prevents the use of the non-standard AUTHENTICATE LOGIN command, instead using the

plain LOGIN command. The Default is "false". The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

auth-plain-disable optional If "true", prevents use of the AUTHENTICATE PLAIN command.

Default is "false". The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

starttls-enable optional If "true", enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands.

Note that an appropriate trust store must configured so that the client will trust the server's certificate. This feature only works on J2SE 1.4 and newer systems. Default is "false". The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

localaddress optional Local address (host name) to bind to when creating the IMAP socket.

Defaults to the address picked by the Socket class. Should not normally need to be set, but useful with multi-homed hosts where it's important to pick a particular local address to bind to. The attribute's value cannot be null.

localport optional Local port number to bind to when creating the IMAP socket.

Defaults to the port number picked by the Socket class. The attribute's value cannot be null.

sasl-enable optional If set to "true", attempt to use the javax.security.sasl package to choose an authentication mechanism for login. Defaults to "false".

The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

sasl-mechanisms optional A space or comma separated list of SASL mechanism names to try to use.

The attribute's value cannot be null.

sasl-authorizationid optional The authorization ID to use in the SASL authentication.

If not set, the authetication ID (user name) is used. The attribute's value cannot be null.

socketFactory-class optional If set, specifies the name of a class that implements the javax.net.SocketFactory interface.

This class will be used to create IMAP sockets. The attribute's value cannot be null.

socketFactory-fallback optional If set to "true", failure to create a socket using the specified socket factory class will cause the socket to be created using the java.net.Socket class. Defaults to "true".

The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

socketFactory-port optional Specifies the port to connect to when using the specified socket factory.

If not set, the default port will be used. The attribute's value cannot be null.

Might contain the sub-elements:

mime

Represents the MIME mail configuration parameters.

The mime Element is used by: mail-service.

The following table shows its attributes:

Attribute Type Description
address-strict optional The mail.mime.address.strict session property controls the parsing of address headers.

By default, strict parsing of address headers is done. If this property is set to "false", strict parsing is not done and many illegal addresses that sometimes occur in real messages are allowed. See the InternetAddress class for details. The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

charset optional The mail.mime.charset System property can be used to specify the default MIME charset to use for encoded words and text parts that don't otherwise specify a charset.

Normally, the default MIME charset is derived from the default Java charset, as specified in the file.encoding System property. Most applications will have no need to explicitly set the default MIME charset. In cases where the default MIME charset to be used for mail messages is different than the charset used for files stored on the system, this property should be setted. The attribute's value cannot be null.

decodetext-strict optional The mail.mime.decodetext.strict property controls decoding of MIME encoded words.

The MIME spec requires that encoded words start at the beginning of a whitespace separated word. Some mailers incorrectly include encoded words in the middle of a word. If the mail.mime.decodetext.strict System property is set to "false", an attempt will be made to decode these illegal encoded words. The default is "true". The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

encodeeol-strict optional The mail.mime.encodeeol.strict property controls the choice of Content-Transfer-Encoding for MIME parts that are not of type "text".

Often such parts will contain textual data for which an encoding that allows normal end of line conventions is appropriate. In rare cases, such a part will appear to contain entirely textual data, but will require an encoding that preserves CR and LF characters without change. If the mail.mime.encodeeol.strict System property is set to "true", such an encoding will be used when necessary. The default is "false". The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

base64-ignoreerrors optional If set to "true", the BASE64 decoder will ignore errors in the encoded data, returning EOF.

This may be useful when dealing with improperly encoded messages that contain extraneous data at the end of the encoded stream. Note however that errors anywhere in the stream will cause the decoder to stop decoding so this should be used with extreme caution. The default is "false". This property is supported by Sun's implementation of JavaMail, but is not currently a required part of the specification. The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

foldtext optional If set to "true", header fields containing just text such as the Subject and Content-Description header fields, and long parameter values in structured headers such as Content-Type will be folded (broken into 76 character lines) when set and unfolded when read.

The default is "true". This property is supported by Sun's implementation of JavaMail, but is not currently a required part of the specification. The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

setcontenttypefilename optional If set to "true", the setFileName method will also set the name parameter on the Content-Type header to the specified filename. This supports interoperability with some old mail clients.

The default is "true". This property is supported by Sun's implementation of JavaMail, but is not currently a required part of the specification. The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

setdefaulttextcharset optional When updating the headers of a message, a body part with a text content type but no charset parameter will have a charset parameter added to it if this property is set to "true".

The default is "true". This property is supported by Sun's implementation of JavaMail, but is not currently a required part of the specification. The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

multipart-ignoremissingendboundary optional When parsing a multipart MIME message, a message that is missing the final end boundary line is not considered as an error. The data simply ends at the end of the input.

Note that messages of this form violate the MIME specification. If the property mail.mime.multipart.ignoremissingendboundary is setted to "false", such messages are considered an error and a MesagingException will be thrown when parsing such a message. This property is supported by Sun Microsystem implementation of JavaMail, but is not currently a required part of the specification. The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

Might contain the sub-elements: