8.3 Notes on using JavaMail

This section describes the notes on using JavaMail.

Organization of this section
(1) Occurrence of method exceptions
(2) Operating the SEEN flag in POP3
(3) JavaMail providers
(4) Response codes
(5) Notes on connecting to the mail server and receiving mails using an application
(6) Differences with the JavaMail specifications

(1) Occurrence of method exceptions

The exceptions do not occur as per the JavaMail specifications in the methods of the following classes:

No.Class nameMethod name
1javax.mail.MessagesetFlag, setFlags
2javax.mail.FoldersetFlags

Even if you change the flag value using the methods described in the table for the javax.mail.Message object acquired from the javax.mail.Folder object for which READ_ONLY is specified, the flag is set correctly as in the case when READ_WRITE is specified.

However, in the case of the POP3 server, even if you open the folder with READ_ONLY and set the DELETED flag for a message, the mail is not actually deleted.

(2) Operating the SEEN flag in POP3

With the JavaMail specifications, if you use the getInputStream method and getContent method of Message, the specifications mention that the SEEN flag is set up, but the SEEN flag is not actually set up.

(3) JavaMail providers

The SMTP, SMTPS, and POP3 providers, provided by default by Application Server, are the only JavaMail providers that can be used with Application Server. The operations might not function normally if you change to another provider by using the javamail.providers file.

(4) Response codes

Unlike the rigorous RFC specifications, the response codes considered invalid in RFC specifications might not be considered as invalid by JavaMail. Therefore, instead of the messages (KDJE59111-E or KDJE59112-E) that indicate the receipt of a non-RFC specification invalid response, the messages (KDJE59107-E, KDJE59108-E, KDJE59109-E, or KDJE59110-E) that indicate the receipt of an error value response code might be output.

(5) Notes on connecting to the mail server and receiving mails using an application

After you connect to the mail server and receive mails using an application, if you stop or reload the application without invoking the following methods, the KDJE59106-E message might be output:

In this case, check whether the respective close methods have been invoked.

Note that the KDJE59106-E message is output, but the stop and reload processing of the application is not affected. The JavaMail operations are also not affected.

(6) Differences with the JavaMail specifications

If only Reply-To: is specified in the mail header and the Reply-To header field, and if the address is not specified, Application Server JavaMail returns an array of the javax.mail.Address object with length 0 to the getReplyTo method of the javax.mail.MimeMessage class, instead of returning the return value of the getFrom method.