<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>com.sun.mail.smtp (JavaMail API documentation)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="com.sun.mail.smtp (JavaMail API documentation)";
        }
    }
    catch(err) {
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li class="navBarCell1Rev">Package</li>
<li>Class</li>
<li><a href="package-use.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../com/sun/mail/pop3/package-summary.html">Prev&nbsp;Package</a></li>
<li><a href="../../../../com/sun/mail/util/package-summary.html">Next&nbsp;Package</a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/sun/mail/smtp/package-summary.html" target="_top">Frames</a></li>
<li><a href="package-summary.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<a name="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 title="Package" class="title">Package&nbsp;com.sun.mail.smtp</h1>
<div class="docSummary">
<div class="block">An SMTP protocol provider for the JavaMail API
that provides access to an SMTP server.</div>
</div>
<p>See:&nbsp;<a href="#package.description">Description</a></p>
</div>
<div class="contentContainer">
<ul class="blockList">
<li class="blockList">
<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation">
<caption><span>Class Summary</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="../../../../com/sun/mail/smtp/SMTPMessage.html" title="class in com.sun.mail.smtp">SMTPMessage</a></td>
<td class="colLast">
<div class="block">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.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../com/sun/mail/smtp/SMTPSSLTransport.html" title="class in com.sun.mail.smtp">SMTPSSLTransport</a></td>
<td class="colLast">
<div class="block">This class implements the Transport abstract class using SMTP
 over SSL for message submission and transport.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../com/sun/mail/smtp/SMTPTransport.html" title="class in com.sun.mail.smtp">SMTPTransport</a></td>
<td class="colLast">
<div class="block">This class implements the Transport abstract class using SMTP for
 message submission and transport.</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Exception Summary table, listing exceptions, and an explanation">
<caption><span>Exception Summary</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Exception</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="../../../../com/sun/mail/smtp/SMTPAddressFailedException.html" title="class in com.sun.mail.smtp">SMTPAddressFailedException</a></td>
<td class="colLast">
<div class="block">This exception is thrown when the message cannot be sent.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../com/sun/mail/smtp/SMTPAddressSucceededException.html" title="class in com.sun.mail.smtp">SMTPAddressSucceededException</a></td>
<td class="colLast">
<div class="block">This exception is chained off a SendFailedException when the
 <code>mail.smtp.reportsuccess</code> property is true.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../com/sun/mail/smtp/SMTPSenderFailedException.html" title="class in com.sun.mail.smtp">SMTPSenderFailedException</a></td>
<td class="colLast">
<div class="block">This exception is thrown when the message cannot be sent.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../com/sun/mail/smtp/SMTPSendFailedException.html" title="class in com.sun.mail.smtp">SMTPSendFailedException</a></td>
<td class="colLast">
<div class="block">This exception is thrown when the message cannot be sent.</div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
<a name="package.description">
<!--   -->
</a>
<h2 title="Package com.sun.mail.smtp Description">Package com.sun.mail.smtp Description</h2>
<div class="block">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.
<P>
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.
<P>
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/rfc4616.txt" TARGET="_top">RFC 4616</A>
and <A HREF="http://www.ietf.org/rfc/rfc2831.txt" TARGET="_top">RFC 2831</A>).
<P>
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();
</PRE></BLOCKQUOTE>
</LI>
</UL>
<P>
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>
The SMTP protocol provider can use SASL
(<A HREF="http://www.ietf.org/rfc/rfc2222.txt" TARGET="_top">RFC 2222</A>)
authentication mechanisms on systems that support the
<CODE>javax.security.sasl</CODE> APIs, such as J2SE 5.0.
In addition to the SASL mechanisms that are built into 
the SASL implementation, users can also provide additional
SASL mechanisms of their own design to support custom authentication
schemes.  See the
<A HREF="http://java.sun.com/j2se/1.5.0/docs/guide/security/sasl/sasl-refguide.html" TARGET="_top">
Java SASL API Programming and Deployment Guide</A> for details.
Note that the current implementation doesn't support SASL mechanisms
that provide their own integrity or confidentiality layer.
<P>
Support for OAuth 2.0 authentication via the
<A HREF="https://developers.google.com/gmail/xoauth2_protocol" TARGET="_top">
XOAUTH2 authentication mechanism</A> is provided either through the SASL
support described above or as a built-in authentication mechanism in the
SMTP provider.
The OAuth 2.0 Access Token should be passed as the password for this mechanism.
See <A HREF="https://java.net/projects/javamail/pages/OAuth2" TARGET="_top">
OAuth2 Support</A> for details.
<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>.
<P>
See below for the properties to enable these features.
<P>
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>
<P>
The SMTP protocol provider supports the CHUNKING extension defined in
<A HREF="http://www.ietf.org/rfc/rfc3030.txt" TARGET="_top">RFC 3030</A>.
Set the <code>mail.smtp.chunksize</code> property to the desired chunk
size in bytes.
If the server supports the CHUNKING extension, the BDAT command will be
used to send the message in chunksize pieces.  Note that no pipelining is
done so this will be slower than sending the message in one piece.
Note also that the BINARYMIME extension described in RFC 3030 is NOT supported.
<P>
<A NAME="properties">
<H4>Properties</H4>
</A>
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
<PRE>
        props.put("mail.smtp.port", "888");
</PRE>
to set the <CODE>mail.smtp.port</CODE> property, which is of type int.
<P>
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>

<A NAME="mail.smtp.user"></A>
<TR id="mail.smtp.user">
<TD>mail.smtp.user</TD>
<TD>String</TD>
<TD>Default user name for SMTP.</TD>
</TR>

<A NAME="mail.smtp.host"></A>
<TR id="mail.smtp.host">
<TD>mail.smtp.host</TD>
<TD>String</TD>
<TD>The SMTP server to connect to.</TD>
</TR>

<A NAME="mail.smtp.port"></A>
<TR id="mail.smtp.port">
<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>
</TR>

<A NAME="mail.smtp.connectiontimeout"></A>
<TR id="mail.smtp.connectiontimeout">
<TD>mail.smtp.connectiontimeout</TD>
<TD>int</TD>
<TD>Socket connection timeout value in milliseconds.
This timeout is implemented by java.net.Socket.
Default is infinite timeout.</TD>
</TR>

<A NAME="mail.smtp.timeout"></A>
<TR id="mail.smtp.timeout">
<TD>mail.smtp.timeout</TD>
<TD>int</TD>
<TD>Socket read timeout value in milliseconds.
This timeout is implemented by java.net.Socket.
Default is infinite timeout.</TD>
</TR>

<A NAME="mail.smtp.writetimeout"></A>
<TR id="mail.smtp.writetimeout">
<TD>mail.smtp.writetimeout</TD>
<TD>int</TD>
<TD>Socket write timeout value in milliseconds.
This timeout is implemented by using a
java.util.concurrent.ScheduledExecutorService per connection
that schedules a thread to close the socket if the timeout expires.
Thus, the overhead of using this timeout is one thread per connection.
Default is infinite timeout.</TD>
</TR>

<A NAME="mail.smtp.from"></A>
<TR id="mail.smtp.from">
<TD>mail.smtp.from</TD>
<TD>String</TD>
<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>
</TR>

<A NAME="mail.smtp.localhost"></A>
<TR id="mail.smtp.localhost">
<TD>mail.smtp.localhost</TD>
<TD>String</TD>
<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>
</TR>

<A NAME="mail.smtp.localaddress"></A>
<TR id="mail.smtp.localaddress">
<TD>mail.smtp.localaddress</TD>
<TD>String</TD>
<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>

<A NAME="mail.smtp.localport"></A>
<TR id="mail.smtp.localport">
<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>

<A NAME="mail.smtp.ehlo"></A>
<TR id="mail.smtp.ehlo">
<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>

<A NAME="mail.smtp.auth"></A>
<TR id="mail.smtp.auth">
<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>

<A NAME="mail.smtp.auth.mechanisms"></A>
<TR id="mail.smtp.auth.mechanisms">
<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
except XOAUTH2.
</TD>
</TR>

<A NAME="mail.smtp.auth.login.disable"></A>
<TR id="mail.smtp.auth.login.disable">
<TD>mail.smtp.auth.login.disable</TD>
<TD>boolean</TD>
<TD>If true, prevents use of the <code>AUTH LOGIN</code> command.
Default is false.</TD>
</TR>

<A NAME="mail.smtp.auth.plain.disable"></A>
<TR id="mail.smtp.auth.plain.disable">
<TD>mail.smtp.auth.plain.disable</TD>
<TD>boolean</TD>
<TD>If true, prevents use of the <code>AUTH PLAIN</code> command.
Default is false.</TD>
</TR>

<A NAME="mail.smtp.auth.digest-md5.disable"></A>
<TR id="mail.smtp.auth.digest-md5.disable">
<TD>mail.smtp.auth.digest-md5.disable</TD>
<TD>boolean</TD>
<TD>If true, prevents use of the <code>AUTH DIGEST-MD5</code> command.
Default is false.</TD>
</TR>

<A NAME="mail.smtp.auth.ntlm.disable"></A>
<TR id="mail.smtp.auth.ntlm.disable">
<TD>mail.smtp.auth.ntlm.disable</TD>
<TD>boolean</TD>
<TD>If true, prevents use of the <code>AUTH NTLM</code> command.
Default is false.</TD>
</TR>

<A NAME="mail.smtp.auth.ntlm.domain"></A>
<TR id="mail.smtp.auth.ntlm.domain">
<TD>mail.smtp.auth.ntlm.domain</TD>
<TD>String</TD>
<TD>
The NTLM authentication domain.
</TD>
</TR>

<A NAME="mail.smtp.auth.ntlm.flags"></A>
<TR id="mail.smtp.auth.ntlm.flags">
<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>

<!--
<A NAME="mail.smtp.auth.ntlm.unicode"></A>
<TR id="mail.smtp.auth.ntlm.unicode">
<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>

<A NAME="mail.smtp.auth.ntlm.lmcompat"></A>
<TR id="mail.smtp.auth.ntlm.lmcompat">
<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>
-->

<A NAME="mail.smtp.auth.xoauth2.disable"></A>
<TR id="mail.smtp.auth.xoauth2.disable">
<TD>mail.smtp.auth.xoauth2.disable</TD>
<TD>boolean</TD>
<TD>If true, prevents use of the <code>AUTHENTICATE XOAUTH2</code> command.
Because the OAuth 2.0 protocol requires a special access token instead of
a password, this mechanism is disabled by default.  Enable it by explicitly
setting this property to "false" or by setting the "mail.smtp.auth.mechanisms"
property to "XOAUTH2".</TD>
</TR>

<A NAME="mail.smtp.submitter"></A>
<TR id="mail.smtp.submitter">
<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>

<A NAME="mail.smtp.dsn.notify"></A>
<TR id="mail.smtp.dsn.notify">
<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>

<A NAME="mail.smtp.dsn.ret"></A>
<TR id="mail.smtp.dsn.ret">
<TD>mail.smtp.dsn.ret</TD>
<TD>String</TD>
<TD>The RET option to the MAIL command.  Either FULL or HDRS.</TD>
</TR>

<A NAME="mail.smtp.allow8bitmime"></A>
<TR id="mail.smtp.allow8bitmime">
<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>

<A NAME="mail.smtp.sendpartial"></A>
<TR id="mail.smtp.sendpartial">
<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>

<A NAME="mail.smtp.sasl.enable"></A>
<TR id="mail.smtp.sasl.enable">
<TD>mail.smtp.sasl.enable</TD>
<TD>boolean</TD>
<TD>
If set to true, attempt to use the javax.security.sasl package to
choose an authentication mechanism for login.
Defaults to false.
</TD>
</TR>

<A NAME="mail.smtp.sasl.mechanisms"></A>
<TR id="mail.smtp.sasl.mechanisms">
<TD>mail.smtp.sasl.mechanisms</TD>
<TD>String</TD>
<TD>
A space or comma separated list of SASL mechanism names to try
to use.
</TD>
</TR>

<A NAME="mail.smtp.sasl.authorizationid"></A>
<TR id="mail.smtp.sasl.authorizationid">
<TD>mail.smtp.sasl.authorizationid</TD>
<TD>String</TD>
<TD>
The authorization ID to use in the SASL authentication.
If not set, the authentication ID (user name) is used.
</TD>
</TR>

<A NAME="mail.smtp.sasl.realm"></A>
<TR id="mail.smtp.sasl.realm">
<TD>mail.smtp.sasl.realm</TD>
<TD>String</TD>
<TD>The realm to use with DIGEST-MD5 authentication.</TD>
</TR>

<A NAME="mail.smtp.sasl.usecanonicalhostname"></A>
<TR id="mail.smtp.sasl.usecanonicalhostname">
<TD>mail.smtp.sasl.usecanonicalhostname</TD>
<TD>boolean</TD>
<TD>
If set to true, the canonical host name returned by
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/./java/net/InetAddress.html?is-external=true#getCanonicalHostName--" title="class or interface in java.net"><code>InetAddress.getCanonicalHostName</code></a>
is passed to the SASL mechanism, instead of the host name used to connect.
Defaults to false.
</TD>
</TR>

<A NAME="mail.smtp.quitwait"></A>
<TR id="mail.smtp.quitwait">
<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>

<A NAME="mail.smtp.reportsuccess"></A>
<TR id="mail.smtp.reportsuccess">
<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:A-"><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>

<A NAME="mail.smtp.socketFactory"></A>
<TR id="mail.smtp.socketFactory">
<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>

<A NAME="mail.smtp.socketFactory.class"></A>
<TR id="mail.smtp.socketFactory.class">
<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>

<A NAME="mail.smtp.socketFactory.fallback"></A>
<TR id="mail.smtp.socketFactory.fallback">
<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>

<A NAME="mail.smtp.socketFactory.port"></A>
<TR id="mail.smtp.socketFactory.port">
<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>

<A NAME="mail.smtp.ssl.enable"></A>
<TR id="mail.smtp.ssl.enable">
<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>

<A NAME="mail.smtp.ssl.checkserveridentity"></A>
<TR id="mail.smtp.ssl.checkserveridentity">
<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>
</TR>

<A NAME="mail.smtp.ssl.trust"></A>
<TR id="mail.smtp.ssl.trust">
<TD>mail.smtp.ssl.trust</TD>
<TD>String</TD>
<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>

<A NAME="mail.smtp.ssl.socketFactory"></A>
<TR id="mail.smtp.ssl.socketFactory">
<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>

<A NAME="mail.smtp.ssl.socketFactory.class"></A>
<TR id="mail.smtp.ssl.socketFactory.class">
<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>

<A NAME="mail.smtp.ssl.socketFactory.port"></A>
<TR id="mail.smtp.ssl.socketFactory.port">
<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>

<A NAME="mail.smtp.ssl.protocols"></A>
<TR id="mail.smtp.ssl.protocols">
<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>

<A NAME="mail.smtp.ssl.ciphersuites"></A>
<TR id="mail.smtp.ssl.ciphersuites">
<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>

<A NAME="mail.smtp.starttls.enable"></A>
<TR id="mail.smtp.starttls.enable">
<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>
</TR>

<A NAME="mail.smtp.starttls.required"></A>
<TR id="mail.smtp.starttls.required">
<TD>mail.smtp.starttls.required</TD>
<TD>boolean</TD>
<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>

<A NAME="mail.smtp.proxy.host"></A>
<TR id="mail.smtp.proxy.host">
<TD>mail.smtp.proxy.host</TD>
<TD>string</TD>
<TD>
Specifies the host name of an HTTP web proxy server that will be used for
connections to the mail server.
</TD>
</TR>

<A NAME="mail.smtp.proxy.port"></A>
<TR id="mail.smtp.proxy.port">
<TD>mail.smtp.proxy.port</TD>
<TD>string</TD>
<TD>
Specifies the port number for the HTTP web proxy server.
Defaults to port 80.
</TD>
</TR>

<A NAME="mail.smtp.socks.host"></A>
<TR id="mail.smtp.socks.host">
<TD>mail.smtp.socks.host</TD>
<TD>string</TD>
<TD>
Specifies the host name of a SOCKS5 proxy server that will be used for
connections to the mail server.
</TD>
</TR>

<A NAME="mail.smtp.socks.port"></A>
<TR id="mail.smtp.socks.port">
<TD>mail.smtp.socks.port</TD>
<TD>string</TD>
<TD>
Specifies the port number for the SOCKS5 proxy server.
This should only need to be used if the proxy server is not using
the standard port number of 1080.
</TD>
</TR>

<A NAME="mail.smtp.mailextension"></A>
<TR id="mail.smtp.mailextension">
<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>

<A NAME="mail.smtp.userset"></A>
<TR id="mail.smtp.userset">
<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>

<A NAME="mail.smtp.noop.strict"></A>
<TR id="mail.smtp.noop.strict">
<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.
</TD>
</TR>

</TABLE>
<P>
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
<code>Session</code> method <code>getTransport</code> to acquire an
appropriate <code>Transport</code> object.
<P>
In addition to printing debugging output as controlled by the
<a href="../../../../javax/mail/Session.html" title="class in javax.mail"><code>Session</code></a> configuration,
the com.sun.mail.smtp provider logs the same information using
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/./java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging"><code>Logger</code></a> as described in the following table:
<P>
<TABLE BORDER>
<TR>
<TH>Logger Name</TH>
<TH>Logging Level</TH>
<TH>Purpose</TH>
</TR>

<TR>
<TD>com.sun.mail.smtp</TD>
<TD>CONFIG</TD>
<TD>Configuration of the SMTPTransport</TD>
</TR>

<TR>
<TD>com.sun.mail.smtp</TD>
<TD>FINE</TD>
<TD>General debugging output</TD>
</TR>

<TR>
<TD>com.sun.mail.smtp.protocol</TD>
<TD>FINEST</TD>
<TD>Complete protocol trace</TD>
</TR>
</TABLE>

<P>
<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.</div>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li class="navBarCell1Rev">Package</li>
<li>Class</li>
<li><a href="package-use.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../com/sun/mail/pop3/package-summary.html">Prev&nbsp;Package</a></li>
<li><a href="../../../../com/sun/mail/util/package-summary.html">Next&nbsp;Package</a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/sun/mail/smtp/package-summary.html" target="_top">Frames</a></li>
<li><a href="package-summary.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<a name="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 1996-2017,     <a href="http://www.oracle.com">Oracle</a>     and/or its affiliates. All Rights Reserved.     Use is subject to     <a href="../../../../doc-files/speclicense.html" target="_top">license terms</a>.</small></p>
</body>
</html>