This subsection describes the SMTP provider and SMTPS provider-specific session properties.
The following table lists and describes the SMTP provider and SMTPS provider-specific session properties. Note that if smtps is specified as the protocol to be used, the smtp part of the property name becomes smtps.
Table 8-2 List of the SMTP provider and SMTPS provider-specific session properties
No. | Property | Default value | Valid value | Operation when an invalid value is specified |
---|---|---|---|---|
1 | mail.smtp.allow8bitmime | false | true, false (not case-sensitive) | The message KDJE59100-W is output during the send processing to the mail server. The default value is used. |
2 | mail.smtp.auth | false | true, false (not case-sensitive) | The message KDJE59100-W is output when connecting to the mail server. The default value is used. |
3 | mail.smtp.connectiontimeout | 0 (Wait infinitely) | 0 to 2147483647 (unit: millisecond) | The message KDJE59100-W is output when connecting to the mail server. The default value is used. |
4 | mail.smtp.dsn.notify | None |
| The specified value is used as is. If the value is considered invalid in the mail server, the RCPT command fails, and the sending of the mail is cancelled. The mail server processing depends on the mail server. |
5 | mail.smtp.dsn.ret | None | FULL, HDRS | The specified value is used as is. If the value is considered invalid in the mail server, the MAIL command fails, and the sending of the mail is cancelled. The mail server processing depends on the mail server. |
6 | mail.smtp.ehlo | true | true, false (not case-sensitive) | The message KDJE59100-W is output when connecting to the mail server. The default value is used. |
7 | mail.smtp.from | Value specified in <mail.form> | Character string | JavaMail or the mail server might return an exception. The cases in which the mail server returns an exception depend on the mail server. |
8 | mail.smtp.localhost | Return value of java.net.InetAddress.getLocalHost().getHostName() | Character string | The specified value is used as is. |
9 | mail.smtp.noop.strict | true | true, false (not case-sensitive) | The message KDJE59100-W is output when the javax.mail.Transport object is obtained. The default value is used. |
10 | mail.smtp.quitwait | false | true, false (not case-sensitive) | The message KDJE59100-W is output when the javax.mail.Transport object is acquired. The default value is used. |
11 | mail.smtp.saslrealm | None | Character string | The specified value is used as is. |
12 | mail.smtp.sendpartial | false | true, false (not case-sensitive) | The message KDJE59100-W is output during the send processing to the mail server. The default value is used. |
13 | mail.smtp.timeout | 0 (Wait infinitely) | 0 to 2147483647 (unit: millisecond) | The message KDJE59100-W is output when connecting to the mail server. The default value is used. |
The following is a description of the properties:
This property specifies whether to convert the quoted-printable and base64 encoded message text to an 8-bit encoding.
If you specify true and if the following conditions are fulfilled, the quoted-printable and base64 encoded message text is converted to an 8-bit encoding.
If you specify false, the text is not converted to an 8-bit encoding.
This property specifies whether to perform user authentication using the AUTH command.
If you specify true, the user authentication is performed by using the AUTH command. If you specify false, the user authentication is not performed using the AUTH command.
This property specifies the timeout value until a connection is established (unit: millisecond).
If you specify 0, the system continues to wait infinitely.
When this property is specified, the timeout value is monitored by using threads. If the threads cannot be created due to the policy or system constraints, the timeout value is not monitored.
If the timeout value is greater than the timeout value based on the TCP resend timer of the OS, or if the timeout is not to be monitored, the timeout value based on the TCP resend timer is enabled. Note that the timeout based on the resend timer differs depending on the OS.
This property specifies the NOTIFY option of the RCPT command.
This option specifies the conditions for generating the DSN (Delivery Status Notification). You can combine and specify the values described in the following table, using commas to demarcate the values.
Table 8-3 Values that can be specified in mail.smtp.dsn.notify
No. | Value | Specified contents |
---|---|---|
1 | NEVER | The DSN is not returned to the sender regardless of the delivery status. |
2 | SUCCESS | The DSN is generated when the message is delivered successfully. |
3 | FAILURE | The DSN is generated when the delivery of the message fails. |
4 | DELAY | The DSN is generated when the delivery of the message is delayed. |
If no value is specified for the DSN generation, this might be interpreted as NOTIFY=FAILURE or NOTIFY=FAILURE,DELAY has been specified in RFC1891 and depends on the implementation of the server.
This property specifies the value of the RET addition parameter of the MAIL command.
You can combine and specify the values described in the following table.
Table 8-4 Values that can be specified in mail.smtp.dsn.ret
No. | Value | Specified contents |
---|---|---|
1 | FULL | The entire sent message is included in the message reporting delivery failure. |
2 | HDRS | Only the header of the sent message is included in the message reporting delivery failure. |
If you do not specify the property, the contents to be included in the message reporting delivery failure depend on the implementation of the server.
This property specifies whether to use the EHLO command.
If you specify true, the EHLO command will be used. If an error occurs in the EHLO command, the HELO command is used as a substitute. If you specify false, the EHLO command is not used.
This property specifies the email address to be used in reverse-path in the SMTP and SMTPS MAIL command.
This property specifies the domain name of the local host used in the SMTP and SMTPS HELO command or EHLO command.
This property need not be specified if the JDK and name service is defined appropriately.
This property is used to change the response that determines the connected status when the status of connection with the mail server is checked.
If you specify true, the connected status is assumed when the mail server response for the NOOP command is 250. If you specify false, the connected status is assumed when the mail server response for the NOOP command is any positive integer value except 421.
This property specifies whether the system will await a response for the QUIT command.
If you specify true, the system awaits a response for the QUIT command. If you specify false, the connection is closed immediately after the QUIT command is sent.
This property specifies the realm to be used for the DIGEST-MD5 authentication.
If you omit this property, the first realm included in the challenge from the server is used. If the challenge does not contain a realm, the connection destination host is used as the realm.
This property specifies the operation to be performed when the email address specified in a message contains an incorrect email address.
If you specify true, the message is sent and then the email address with error is reported with SendFailedException. If you specify false, the message is not sent.
This property specifies the timeout value (unit: millisecond) for communication (read) with the SMTP server.
If you specify 0, the system continues to wait infinitely.
If the timeout value is greater than the timeout value based on the TCP resend timer of the OS, or if the timeout is not to be monitored, the timeout value based on the TCP resend timer is enabled. Note that the timeout based on the resend timer differs depending on the OS.