<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<!-- Generated by javadoc (build 1.6.0_10) on Tue Nov 17 12:13:43 PST 2009 -->
<
META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
com.sun.mail.smtp (JavaMail API documentation)
<
META NAME="date" CONTENT="2009-11-17">
<
LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<
SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="com.sun.mail.smtp (JavaMail API documentation)";
}
}
<
BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<
A NAME="navbar_top"><!-- --><
/A>
<
A HREF="#skip-navbar_top" title="Skip navigation links"><
/A>
<
TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<
TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<
A NAME="navbar_top_firstrow"><!-- --><
/A>
<
TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<
TR ALIGN="center" VALIGN="top">
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../../../overview-summary.html"><
FONT CLASS="NavBarFont1"><
B>Overview<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <
FONT CLASS="NavBarFont1Rev"><
B>Package<
/B><
/FONT> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
FONT CLASS="NavBarFont1">Class<
/FONT> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="package-use.html"><
FONT CLASS="NavBarFont1"><
B>Use<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="package-tree.html"><
FONT CLASS="NavBarFont1"><
B>Tree<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../../../deprecated-list.html"><
FONT CLASS="NavBarFont1"><
B>Deprecated<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../../../index-files/index-1.html"><
FONT CLASS="NavBarFont1"><
B>Index<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../../../help-doc.html"><
FONT CLASS="NavBarFont1"><
B>Help<
/B><
/FONT><
/A> <
/TD>
<
TD ALIGN="right" VALIGN="top" ROWSPAN=3><
EM>
<
TD BGCOLOR="white" CLASS="NavBarCell2"><
FONT SIZE="-2">
<
A HREF="../../../../com/sun/mail/pop3/package-summary.html"><
B>PREV PACKAGE<
/B><
/A>
<
A HREF="../../../../com/sun/mail/util/package-summary.html"><
B>NEXT PACKAGE<
/B><
/A><
/FONT><
/TD>
<
TD BGCOLOR="white" CLASS="NavBarCell2"><
FONT SIZE="-2">
<
A HREF="../../../../index.html?com/sun/mail/smtp/package-summary.html" target="_top"><
B>FRAMES<
/B><
/A>
<
A HREF="package-summary.html" target="_top"><
B>NO FRAMES<
/B><
/A>
<
SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
<
A HREF="../../../../allclasses-noframe.html"><
B>All Classes<
/B><
/A>
<
A NAME="skip-navbar_top"><
/A>
<!-- ========= END OF TOP NAVBAR ========= -->
Package com.sun.mail.smtp
An SMTP protocol provider for the JavaMail API
that provides access to an SMTP server.
<
A HREF="#package_description"><
B>Description<
/B><
/A>
<
TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<
TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<
TH ALIGN="left" COLSPAN="2"><
FONT SIZE="+2">
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD WIDTH="15%"><
B><
A HREF="../../../../com/sun/mail/smtp/SMTPMessage.html" title="class in com.sun.mail.smtp">SMTPMessage<
/A><
/B><
/TD>
<
TD>This
class is a specialization of the MimeMessage
class that allows
you to specify various SMTP options and parameters that will be
used when this message is sent over SMTP.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD WIDTH="15%"><
B><
A HREF="../../../../com/sun/mail/smtp/SMTPSSLTransport.html" title="class in com.sun.mail.smtp">SMTPSSLTransport<
/A><
/B><
/TD>
<
TD>This
class implements the Transport abstract
class using SMTP
over SSL
for message submission and transport.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD WIDTH="15%"><
B><
A HREF="../../../../com/sun/mail/smtp/SMTPTransport.html" title="class in com.sun.mail.smtp">SMTPTransport<
/A><
/B><
/TD>
<
TD>This
class implements the Transport abstract
class using SMTP
for
message submission and transport.<
/TD>
<
TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<
TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<
TH ALIGN="left" COLSPAN="2"><
FONT SIZE="+2">
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD WIDTH="15%"><
B><
A HREF="../../../../com/sun/mail/smtp/SMTPAddressFailedException.html" title="class in com.sun.mail.smtp">SMTPAddressFailedException<
/A><
/B><
/TD>
<
TD>This exception is thrown when the message cannot be sent.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD WIDTH="15%"><
B><
A HREF="../../../../com/sun/mail/smtp/SMTPAddressSucceededException.html" title="class in com.sun.mail.smtp">SMTPAddressSucceededException<
/A><
/B><
/TD>
<
TD>This exception is chained off a SendFailedException when the
<
code>mail.smtp.reportsuccess<
/code> property is true.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD WIDTH="15%"><
B><
A HREF="../../../../com/sun/mail/smtp/SMTPSendFailedException.html" title="class in com.sun.mail.smtp">SMTPSendFailedException<
/A><
/B><
/TD>
<
TD>This exception is thrown when the message cannot be sent.<
/TD>
<
A NAME="package_description"><!-- --><
/A><
H2>
Package com.sun.mail.smtp Description
An SMTP protocol provider for the JavaMail API
that provides access to an SMTP server.
Refer to <
A HREF="http://www.ietf.org/rfc/rfc821.txt" TARGET="_top">RFC
821<
/A>
for more information.
When sending a message, detailed information on each address that
fails is available in an
<
A HREF="../../../../com/sun/mail/smtp/SMTPAddressFailedException.html" title="class in com.sun.mail.smtp"><
CODE>SMTPAddressFailedException<
/CODE><
/A>
chained off the top level
<
A HREF="../../../../javax/mail/SendFailedException.html" title="class in javax.mail"><
CODE>SendFailedException<
/CODE><
/A>
that is thrown.
In addition, if the <
code>mail.smtp.reportsuccess<
/code> property
is set, an
<
A HREF="../../../../com/sun/mail/smtp/SMTPAddressSucceededException.html" title="class in com.sun.mail.smtp"><
CODE>SMTPAddressSucceededException<
/CODE><
/A>
will be included in the list for each address that is successful.
Note that this will cause a top level
<
A HREF="../../../../javax/mail/SendFailedException.html" title="class in javax.mail"><
CODE>SendFailedException<
/CODE><
/A>
to be thrown even though the send was successful.
The SMTP provider also supports ESMTP
(<
A HREF="http://www.ietf.org/rfc/rfc1651.txt" TARGET="_top">RFC
1651<
/A>
).
It can optionally use SMTP Authentication
(<
A HREF="http://www.ietf.org/rfc/rfc2554.txt" TARGET="_top">RFC
2554<
/A>
)
using the LOGIN, PLAIN, DIGEST-MD5, and NTLM mechanisms
(<
A HREF="http://www.ietf.org/rfc/rfc2592.txt" TARGET="_top">RFC
2592<
/A>
and <
A HREF="http://www.ietf.org/rfc/rfc2831.txt" TARGET="_top">RFC
2831<
/A>
).
To use SMTP authentication you'll need to set the <code>mail.smtp.auth</code>
property (see below) or provide the SMTP Transport
with a username and password when connecting to the SMTP server. You
can do this using one of the following approaches:
<P>
<UL>
<LI>
Provide an Authenticator object when creating your mail Session
and provide the username and password information during the
Authenticator callback.
<P>
Note that the <code>mail.smtp.user</code> property can be set to provide a
default username for the callback, but the password will still need to be
supplied explicitly.
<P>
This approach allows you to use the static Transport <code>send</code> method
to send messages.
</LI>
<P>
<LI>
Call the Transport <code>connect</code> method explicitly with username and
password arguments.
<P>
This approach requires you to explicitly manage a Transport object
and use the Transport <code>sendMessage</code> method to send the message.
The transport.java demo program demonstrates how to manage a Transport
object. The following is roughly equivalent to the static
Transport <code>send</code> method, but supplies the needed username and
password:
<P>
<BLOCKQUOTE><PRE>
Transport tr = session.getTransport("smtp");
tr.connect(smtphost, username, password);
msg.saveChanges(); // don't forget this
tr.sendMessage(msg, msg.getAllRecipients());
tr.close();
When using DIGEST-MD5 authentication,
you'll also need to supply an appropriate realm;
your mail server administrator can supply this information.
You can set this using the <code>mail.smtp.sasl.realm</code> property,
or the <code>setSASLRealm</code> method on <code>SMTPTransport</code>.
<P>
SMTP can also optionally request Delivery Status Notifications
(<A HREF="http://www.ietf.org/rfc/rfc1891.txt" TARGET="_top">RFC 1891</A>).
The delivery status will typically be reported using
a "multipart/report"
(<A HREF="http://www.ietf.org/rfc/rfc1892.txt" TARGET="_top">RFC 1892</A>)
message type with a "message/delivery-status"
(<A HREF="http://www.ietf.org/rfc/rfc1894.txt" TARGET="_top">RFC 1894</A>)
part.
You can use the classes in the <A HREF="../../../../com/sun/mail/dsn/package-summary.html"><CODE>com.sun.mail.dsn</CODE></A> package to
handle these MIME types.
Note that you'll need to include <
code>dsn.jar<
/code> in your CLASSPATH
as this support is not included in <
code>mail.jar<
/code>.
See below for the properties to enable these features.
Note also that <
strong>THERE IS NOT SUFFICIENT DOCUMENTATION HERE TO USE THESE
FEATURES!!!<
/strong> You will need to read the appropriate RFCs mentioned above
to understand what these features do and how to use them. Don't just
start setting properties and then complain to us when it doesn't work
like you expect it to work. <
strong>READ THE RFCs FIRST!!!<
/strong>
The SMTP protocol provider supports the following properties,
which may be set in the JavaMail <
code>Session<
/code>
object.
The properties are always set as strings; the Type column describes
how the string is interpreted. For example, use
props.put("mail.smtp.port", "888");
to set the <
CODE>mail.smtp.port<
/CODE> property, which is of
type int.
Note that if you're using the "smtps" protocol to access SMTP over SSL,
all the properties would be named "mail.smtps.*".
<P>
<TABLE BORDER>
<TR>
<TH>Name</TH>
<TH>Type</TH>
<TH>Description</TH>
</TR>
<TR>
<TD>mail.smtp.user</TD>
<TD>String</TD>
<TD>Default user name for SMTP.</TD>
</TR>
<TR>
<TD>mail.smtp.host</TD>
<TD>String</TD>
<TD>The SMTP server to connect to.</TD>
</TR>
<TR>
<TD>mail.smtp.port</TD>
<TD>int</TD>
<TD>The SMTP server port to connect to, if the connect() method doesn't
explicitly specify one. Defaults to
25.<
/TD>
<
TD>mail.smtp.connectiontimeout<
/TD>
<
TD>Socket connection timeout
value in milliseconds.
Default is infinite timeout.<
/TD>
<
TD>mail.smtp.timeout<
/TD>
<
TD>Socket I
/O timeout
value in milliseconds. Default is infinite timeout.<
/TD>
Email address to use for SMTP MAIL command. This sets the envelope
return address. Defaults to msg.getFrom() or
InternetAddress.getLocalAddress(). NOTE: mail.smtp.user was previously
used for this.
<
TD>mail.smtp.localhost<
/TD>
Local host name used in the SMTP HELO or EHLO command.
Defaults to <
code>InetAddress.getLocalHost
().getHostName
()<
/code>.
Should not normally need to
be set if your JDK and your name service are configured properly.
<
TD>mail.smtp.localaddress<
/TD>
Local address (host name) to bind to when creating the SMTP 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.
</TD>
</TR>
<TR>
<TD>mail.smtp.localport</TD>
<TD>int</TD>
<TD>
Local port number to bind to when creating the SMTP socket.
Defaults to the port number picked by the Socket class.
</TD>
</TR>
<TR>
<TD>mail.smtp.ehlo</TD>
<TD>boolean</TD>
<TD>
If false, do not attempt to sign on with the EHLO command. Defaults to
true. Normally failure of the EHLO command will fallback to the HELO
command; this property exists only for servers that don't fail EHLO
properly or don't implement EHLO properly.
</TD>
</TR>
<TR>
<TD>mail.smtp.auth</TD>
<TD>boolean</TD>
<TD>If true, attempt to authenticate the user using the AUTH command.
Defaults to false.</TD>
</TR>
<TR>
<TD>mail.smtp.auth.mechanisms</TD>
<TD>String</TD>
<TD>
If set, lists the authentication mechanisms to consider, and the order
in which to consider them. Only mechanisms supported by the server and
supported by the current implementation will be used.
The default is <code>"LOGIN PLAIN DIGEST-MD5 NTLM"</code>, which includes all
the authentication mechanisms supported by the current implementation.
</TD>
</TR>
<TR>
<TD>mail.smtp.auth.ntlm.domain</TD>
<TD>String</TD>
<TD>
The NTLM authentication domain.
</TD>
</TR>
<TR>
<TD>mail.smtp.auth.ntlm.flags</TD>
<TD>int</TD>
<TD>
NTLM protocol-specific flags.
See <A HREF="http://curl.haxx.se/rfc/ntlm.html#theNtlmFlags" TARGET="_top">
http://curl.haxx.se/rfc/ntlm.html#theNtlmFlags</A> for details.
</TD>
</TR>
<!--
<TR>
<TD>mail.smtp.auth.ntlm.unicode</TD>
<TD>boolean</TD>
<TD>
Set this to "true" if the username or password may use
Unicode UTF-8 encoded characters. Default is "true".
Currently has no effect.
</TD>
</TR>
<TR>
<TD>mail.smtp.auth.ntlm.lmcompat</TD>
<TD>int</TD>
<TD>
Sets the LM compatibility level, as described here:
<A HREF="http://curl.haxx.se/rfc/ntlm.html#ntlmVersion2" TARGET="_top">
http://curl.haxx.se/rfc/ntlm.html#ntlmVersion2</A>
Defaults to "3". Currently not used.
</TD>
</TR>
-->
<TR>
<TD>mail.smtp.submitter</TD>
<TD>String</TD>
<TD>The submitter to use in the AUTH tag in the MAIL FROM command.
Typically used by a mail relay to pass along information about the
original submitter of the message.
See also the <A HREF="../../../../com/sun/mail/smtp/SMTPMessage.html#setSubmitter(java.lang.String)"><CODE>setSubmitter</CODE></A>
method of <A HREF="../../../../com/sun/mail/smtp/SMTPMessage.html" title="class in com.sun.mail.smtp"><CODE>SMTPMessage</CODE></A>.
Mail clients typically do not use this.
</TD>
</TR>
<TR>
<TD>mail.smtp.dsn.notify</TD>
<TD>String</TD>
<TD>The NOTIFY option to the RCPT command. Either NEVER, or some
combination of SUCCESS, FAILURE, and DELAY (separated by commas).</TD>
</TR>
<TR>
<TD>mail.smtp.dsn.ret</TD>
<TD>String</TD>
<TD>The RET option to the MAIL command. Either FULL or HDRS.</TD>
</TR>
<TR>
<TD>mail.smtp.allow8bitmime</TD>
<TD>boolean</TD>
<TD>
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.
</TD>
</TR>
<TR>
<TD>mail.smtp.sendpartial</TD>
<TD>boolean</TD>
<TD>
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.
</TD>
</TR>
<TR>
<TD>mail.smtp.sasl.realm</TD>
<TD>String</TD>
<TD>The realm to use with DIGEST-MD5 authentication.</TD>
</TR>
<TR>
<TD>mail.smtp.quitwait</TD>
<TD>boolean</TD>
<TD>
If set to false, the QUIT command is sent
and the connection is immediately closed.
If set to true (the default), causes the transport to wait
for the response to the QUIT command.
</TD>
</TR>
<TR>
<TD>mail.smtp.reportsuccess</TD>
<TD>boolean</TD>
<TD>
If set to true, causes the transport to include an
<A HREF="../../../../com/sun/mail/smtp/SMTPAddressSucceededException.html" title="class in com.sun.mail.smtp"><CODE>SMTPAddressSucceededException</CODE></A>
for each address that is successful.
Note also that this will cause a
<A HREF="../../../../javax/mail/SendFailedException.html" title="class in javax.mail"><CODE>SendFailedException</CODE></A>
to be thrown from the
<A HREF="../../../../com/sun/mail/smtp/SMTPTransport.html#sendMessage(javax.mail.Message, javax.mail.Address[])"><CODE>sendMessage</CODE></A>
method of
<A HREF="../../../../com/sun/mail/smtp/SMTPTransport.html" title="class in com.sun.mail.smtp"><CODE>SMTPTransport</CODE></A>
even if all addresses were correct and the message was sent
successfully.
</TD>
</TR>
<TR>
<TD>mail.smtp.socketFactory</TD>
<TD>SocketFactory</TD>
<TD>
If set to a class that implements the
<code>javax.net.SocketFactory</code> interface, this class
will be used to create SMTP sockets. Note that this is an
instance of a class, not a name, and must be set using the
<code>put</code> method, not the <code>setProperty</code> method.
</TD>
</TR>
<TR>
<TD>mail.smtp.socketFactory.class</TD>
<TD>String</TD>
<TD>
If set, specifies the name of a class that implements the
<code>javax.net.SocketFactory</code> interface. This class
will be used to create SMTP sockets.
</TD>
</TR>
<TR>
<TD>mail.smtp.socketFactory.fallback</TD>
<TD>boolean</TD>
<TD>
If set to true, failure to create a socket using the specified
socket factory class will cause the socket to be created using
the <code>java.net.Socket</code> class.
Defaults to true.
</TD>
</TR>
<TR>
<TD>mail.smtp.socketFactory.port</TD>
<TD>int</TD>
<TD>
Specifies the port to connect to when using the specified socket
factory.
If not set, the default port will be used.
</TD>
</TR>
<TR>
<TD>mail.smtp.ssl.enable</TD>
<TD>boolean</TD>
<TD>
If set to true, use SSL to connect and use the SSL port by default.
Defaults to false for the "smtp" protocol and true for the "smtps" protocol.
</TD>
</TR>
<TR>
<TD>mail.smtp.ssl.checkserveridentity</TD>
<TD>boolean</TD>
<TD>
If set to true, check the server identity as specified by
<A HREF="http://www.ietf.org/rfc/rfc2595.txt" TARGET="_top">RFC 2595</A>.
These additional checks based on the content of the server's certificate
are intended to prevent man-in-the-middle attacks.
Defaults to false.
<
TD>mail.smtp.ssl.trust<
/TD>
If set, and a socket factory hasn't been specified, enables use of a
<A HREF="../../../../com/sun/mail/util/MailSSLSocketFactory.html" title="class in com.sun.mail.util"><CODE>MailSSLSocketFactory</CODE></A>.
If set to "*", all hosts are trusted.
If set to a whitespace separated list of hosts, those hosts are trusted.
Otherwise, trust depends on the certificate the server presents.
</TD>
</TR>
<TR>
<TD>mail.smtp.ssl.socketFactory</TD>
<TD>SSLSocketFactory</TD>
<TD>
If set to a class that extends the
<code>javax.net.ssl.SSLSocketFactory</code> class, this class
will be used to create SMTP SSL sockets. Note that this is an
instance of a class, not a name, and must be set using the
<code>put</code> method, not the <code>setProperty</code> method.
</TD>
</TR>
<TR>
<TD>mail.smtp.ssl.socketFactory.class</TD>
<TD>String</TD>
<TD>
If set, specifies the name of a class that extends the
<code>javax.net.ssl.SSLSocketFactory</code> class. This class
will be used to create SMTP SSL sockets.
</TD>
</TR>
<TR>
<TD>mail.smtp.ssl.socketFactory.port</TD>
<TD>int</TD>
<TD>
Specifies the port to connect to when using the specified socket
factory.
If not set, the default port will be used.
</TD>
</TR>
<TR>
<TD>mail.smtp.ssl.protocols</TD>
<TD>string</TD>
<TD>
Specifies the SSL protocols that will be enabled for SSL connections.
The property value is a whitespace separated list of tokens acceptable
to the <code>javax.net.ssl.SSLSocket.setEnabledProtocols</code> method.
</TD>
</TR>
<TR>
<TD>mail.smtp.ssl.ciphersuites</TD>
<TD>string</TD>
<TD>
Specifies the SSL cipher suites that will be enabled for SSL connections.
The property value is a whitespace separated list of tokens acceptable
to the <code>javax.net.ssl.SSLSocket.setEnabledCipherSuites</code> method.
</TD>
</TR>
<TR>
<TD>mail.smtp.mailextension</TD>
<TD>String</TD>
<TD>
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.
Typically the application should use the
<A HREF="../../../../com/sun/mail/smtp/SMTPTransport.html" title="class in com.sun.mail.smtp"><CODE>SMTPTransport</CODE></A>
method <A HREF="../../../../com/sun/mail/smtp/SMTPTransport.html#supportsExtension(java.lang.String)"><CODE>supportsExtension</CODE></A>
to verify that the server supports the desired service extension.
See <A HREF="http://www.ietf.org/rfc/rfc1869.txt" TARGET="_top">RFC 1869</A>
and other RFCs that define specific extensions.
</TD>
</TR>
<TR>
<TD>mail.smtp.starttls.enable</TD>
<TD>boolean</TD>
<TD>
If true, enables the use of the <code>STARTTLS</code> 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.
Defaults to false.
<
TD>mail.smtp.starttls.required<
/TD>
If true, requires the use of the <
code>STARTTLS<
/code> command.
If the server doesn't support the STARTTLS command, or the command
fails, the connect method will fail.
Defaults to false.
</TD>
</TR>
<TR>
<TD>mail.smtp.userset</TD>
<TD>boolean</TD>
<TD>
If set to true, use the RSET command instead of the NOOP command
in the <A HREF="../../../../javax/mail/Service.html#isConnected()"><CODE>isConnected</CODE></A> method.
In some cases sendmail will respond slowly after many NOOP commands;
use of RSET avoids this sendmail issue.
Defaults to false.
</TD>
</TR>
<TR>
<TD>mail.smtp.noop.strict</TD>
<TD>boolean</TD>
<TD>
If set to true (the default), insist on a 250 response code from the NOOP
command to indicate success. The NOOP command is used by the
<A HREF="../../../../javax/mail/Service.html#isConnected()"><CODE>isConnected</CODE></A> method to determine
if the connection is still alive.
Some older servers return the wrong response code on success, some
servers don't implement the NOOP command at all and so always return
a failure code. Set this property to false to handle servers
that are broken in this way.
Normally, when a server times out a connection, it will send a 421
response code, which the client will see as the response to the next
command it issues.
Some servers send the wrong failure response code when timing out a
connection.
Do not set this property to false when dealing with servers that are
broken in this way.
In general, applications should not need to use the classes in this
package directly. Instead, they should use the APIs defined by
<
code>javax.mail<
/code> package
(and subpackages
). Applications should
never construct instances of <
code>SMTPTransport<
/code> directly.
Instead, they should use the
appropriate <
code>Transport<
/code>
object.
<
strong>WARNING:<
/strong> The APIs unique to this package should be
considered <
strong>EXPERIMENTAL<
/strong>. They may be changed in the
future in ways that are incompatible with applications using the
current APIs.
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<
A NAME="navbar_bottom"><!-- --><
/A>
<
A HREF="#skip-navbar_bottom" title="Skip navigation links"><
/A>
<
TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<
TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<
A NAME="navbar_bottom_firstrow"><!-- --><
/A>
<
TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<
TR ALIGN="center" VALIGN="top">
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../../../overview-summary.html"><
FONT CLASS="NavBarFont1"><
B>Overview<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <
FONT CLASS="NavBarFont1Rev"><
B>Package<
/B><
/FONT> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
FONT CLASS="NavBarFont1">Class<
/FONT> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="package-use.html"><
FONT CLASS="NavBarFont1"><
B>Use<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="package-tree.html"><
FONT CLASS="NavBarFont1"><
B>Tree<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../../../deprecated-list.html"><
FONT CLASS="NavBarFont1"><
B>Deprecated<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../../../index-files/index-1.html"><
FONT CLASS="NavBarFont1"><
B>Index<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../../../help-doc.html"><
FONT CLASS="NavBarFont1"><
B>Help<
/B><
/FONT><
/A> <
/TD>
<
TD ALIGN="right" VALIGN="top" ROWSPAN=3><
EM>
<
TD BGCOLOR="white" CLASS="NavBarCell2"><
FONT SIZE="-2">
<
A HREF="../../../../com/sun/mail/pop3/package-summary.html"><
B>PREV PACKAGE<
/B><
/A>
<
A HREF="../../../../com/sun/mail/util/package-summary.html"><
B>NEXT PACKAGE<
/B><
/A><
/FONT><
/TD>
<
TD BGCOLOR="white" CLASS="NavBarCell2"><
FONT SIZE="-2">
<
A HREF="../../../../index.html?com/sun/mail/smtp/package-summary.html" target="_top"><
B>FRAMES<
/B><
/A>
<
A HREF="package-summary.html" target="_top"><
B>NO FRAMES<
/B><
/A>
<
SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
<
A HREF="../../../../allclasses-noframe.html"><
B>All Classes<
/B><
/A>
<
A NAME="skip-navbar_bottom"><
/A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
Copyright &#
169;
2009 <
a href="http://www.sun.com">Sun Microsystems, Inc.<
/a>. All Rights Reserved.