-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCOMPAT.txt
136 lines (102 loc) · 5.76 KB
/
COMPAT.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
COMPATIBILITY NOTES
===================
JavaMail(TM) API 1.4.7 release
------------------------------
The JavaMail 1.4 specification is fully compatible with the JavaMail
1.3 specification. However, changes in the implementation may impact
applications that depend on behavior beyond what is defined by the
JavaMail specification, or that use features specific to the Sun
implementation. This note summarizes potential compatibility issues
with this release of the JavaMail API.
-- JavaMail 1.4.4 --
- authorization ID may be null
The IMAP and SMTP providers support a
"mail.<protocol>.sasl.authorizationid" property that allows you
to specify an authorization ID separately from the authentication
ID that's specified as the user name in properties or in the connect
method. The PLAIN authentication method, and some SASL authentication
methods support use of the separate authorization ID. In previous
releases, if the authorization ID was not specified, it defaulted
to the authentication ID (user name). This can cause problems if
the server doesn't allow an authorization ID even though the SASL
method allows specifying one. In this release, if no authorization
ID is specified, null is passed to the SASL method. If this causes
problems for a SASL method implementation or a server, the
"mail.<protocol>.sasl.authorizationid" property should be set to
the user name used for authentication.
-- JavaMail 1.4.3 --
- SMTPTransport.isConnected behavior changed
The SMTPTransport.isConnected method uses the SMTP NOOP command
to determine if the server is still alive. Because many older
servers were broken in various ways, any response (other than
the 421 "connection timed out" response) was considered a
successful response and the server was considered to be still
alive. Unfortunately, Microsoft Exchange has a bug that causes
it to return a response code of 451 when it times out a connection
instead of the expected 421 response code. SMTPTransport.isConnected
now considers only a 250 response code to indicate success, per
the SMTP spec. The old behavior can be restored by setting the
new mail.smtp.noop.strict property to false.
-- JavaMail 1.4.2 --
- mail.smtp.quitwait default changed
In previous releases, JavaMail would drop the SMTP connection
to the server immediately after sending the QUIT command.
This violates the SMTP spec. The property "mail.stmp.quitwait"
controls this behavior. In this release the default behavior
(if the property isn't specified) has changed so that JavaMail
will wait for the response from the server before dropping the
connection. In some cases, with some servers, this additional
wait time may be noticable.
- MessagingException.getMessage output changed
The MessagingException class, which is the base class for all
JavaMail exceptions, has been retrofitted to support the
exception chaining feature added to the java.lang.Throwable
class in J2SE 1.4. The visible impact of this change is that
the String returned by the getMessage method will only return
the immediate message for the top level exception, instead of
including messages for all nested exceptions.
- connection timeouts no longer use a thread
To support connection timeouts in older versions of the JDK,
it was necessary for JavaMail to create a thread to make the
connection, so that it could interrupt and abandon that
thread if the connection timeout expired. J2SE 1.4 added
the ability to specify the connection timeout directly, so
JavaMail no longer uses an additional thread for this purpose.
- ByteArrayDataSource now part of javax.mail.util
The ByteArrayDataSource class, which was previously included
in source form in the demo directory, is now a standard part
of the JavaMail API in the new javax.mail.util package.
Applications that are modified to make use of classes in the
new package, and that also included a copy of the demo version
of ByteArrayDataSource, should be careful to avoid potential
name conflicts between these two classes.
- mail.SSLSocketFactory.class property no longer supported
The JavaMail implementation previously used this undocumented
property to locate the SSLSocketFactory from which it would
create SSLSockets when making an SSL or TLS connection. This
property is no longer used. The standard
javax.net.ssl.SSLSocketFactory is used instead, which supports
a standard way of overriding the choice of default SSLSocketFactory.
See the SSLSocketFactory javadocs for details. Most applications
should never need to override the default SSLSocketFactory.
- Quota class moved from com.sun.mail.imap to javax.mail
The new Quota APIs in JavaMail are taken directly from the old
IMAP-specific classes in the com.sun.mail.imap package. If you've
been using these classes, you'll need to update your application
to use the new classes in the javax.mail package.
- getProtocol method removed from com.sun.mail.imap.IMAPFolder
The getProtocol method returns an instance of IMAPProtocol.
This was originally intended to allow applications to
experiment with extending the IMAP protocol support to use IMAP
commands not directly implemented by the IMAP protocol
provider. Unfortunately, to safely use the IMAPProtocol
object, you need to obey the locking requirements of the
IMAPFolder object, and there's no way to do that from outside
the IMAPFolder object. The doCommand method was added to
IMAPFolder to resolve this problem. Now, with the introduction
of IDLE support to the IMAP protocol provider, it's critical to
obey the locking requirements. To prevent mistakes, the old,
unsafe, getProtocol method has been removed. Applications
should use the doCommand method for simple IMAP extensions.
Use of more complex IMAP extensions may require modification
of the IMAP protocol provider.