Subversion Repositories javautils

Rev

Blame | Last modification | View Log | RSS feed

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--NewPage-->
  3. <HTML>
  4. <HEAD>
  5. <!-- Generated by javadoc (build 1.6.0_10) on Tue Nov 17 12:13:43 PST 2009 -->
  6. <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  7. <TITLE>
  8. javax.mail (JavaMail API documentation)
  9. </TITLE>
  10.  
  11. <META NAME="date" CONTENT="2009-11-17">
  12.  
  13. <LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
  14.  
  15. <SCRIPT type="text/javascript">
  16. function windowTitle()
  17. {
  18.     if (location.href.indexOf('is-external=true') == -1) {
  19.         parent.document.title="javax.mail (JavaMail API documentation)";
  20.     }
  21. }
  22. </SCRIPT>
  23. <NOSCRIPT>
  24. </NOSCRIPT>
  25.  
  26. </HEAD>
  27.  
  28. <BODY BGCOLOR="white" onload="windowTitle();">
  29. <HR>
  30.  
  31.  
  32. <!-- ========= START OF TOP NAVBAR ======= -->
  33. <A NAME="navbar_top"><!-- --></A>
  34. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  35. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  36. <TR>
  37. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  38. <A NAME="navbar_top_firstrow"><!-- --></A>
  39. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  40.   <TR ALIGN="center" VALIGN="top">
  41.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  42.   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
  43.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
  44.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  45.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  46.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  47.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  48.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  49.   </TR>
  50. </TABLE>
  51. </TD>
  52. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  53. </EM>
  54. </TD>
  55. </TR>
  56.  
  57. <TR>
  58. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  59. &nbsp;<A HREF="../../com/sun/mail/util/logging/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp;
  60. &nbsp;<A HREF="../../javax/mail/event/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
  61. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  62.   <A HREF="../../index.html?javax/mail/package-summary.html" target="_top"><B>FRAMES</B></A>  &nbsp;
  63. &nbsp;<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
  64. &nbsp;<SCRIPT type="text/javascript">
  65.   <!--
  66.   if(window==top) {
  67.     document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
  68.   }
  69.   //-->
  70. </SCRIPT>
  71. <NOSCRIPT>
  72.   <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
  73. </NOSCRIPT>
  74.  
  75.  
  76. </FONT></TD>
  77. </TR>
  78. </TABLE>
  79. <A NAME="skip-navbar_top"></A>
  80. <!-- ========= END OF TOP NAVBAR ========= -->
  81.  
  82. <HR>
  83. <H2>
  84. Package javax.mail
  85. </H2>
  86. The JavaMail<sup><font size="-2">TM</font></sup> API
  87. provides classes that model a mail system.
  88. <P>
  89. <B>See:</B>
  90. <BR>
  91. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#package_description"><B>Description</B></A>
  92. <P>
  93.  
  94. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  95. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  96. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  97. <B>Interface Summary</B></FONT></TH>
  98. </TR>
  99. <TR BGCOLOR="white" CLASS="TableRowColor">
  100. <TD WIDTH="15%"><B><A HREF="../../javax/mail/MessageAware.html" title="interface in javax.mail">MessageAware</A></B></TD>
  101. <TD>An interface optionally implemented by <code>DataSources</code> to
  102.  supply information to a <code>DataContentHandler</code> about the
  103.  message context in which the data content object is operating.</TD>
  104. </TR>
  105. <TR BGCOLOR="white" CLASS="TableRowColor">
  106. <TD WIDTH="15%"><B><A HREF="../../javax/mail/MultipartDataSource.html" title="interface in javax.mail">MultipartDataSource</A></B></TD>
  107. <TD>MultipartDataSource is a <code>DataSource</code> that contains body
  108.  parts.</TD>
  109. </TR>
  110. <TR BGCOLOR="white" CLASS="TableRowColor">
  111. <TD WIDTH="15%"><B><A HREF="../../javax/mail/Part.html" title="interface in javax.mail">Part</A></B></TD>
  112. <TD>The <code>Part</code> interface is the common base interface for
  113.  Messages and BodyParts.</TD>
  114. </TR>
  115. <TR BGCOLOR="white" CLASS="TableRowColor">
  116. <TD WIDTH="15%"><B><A HREF="../../javax/mail/QuotaAwareStore.html" title="interface in javax.mail">QuotaAwareStore</A></B></TD>
  117. <TD>An interface implemented by Stores that support quotas.</TD>
  118. </TR>
  119. <TR BGCOLOR="white" CLASS="TableRowColor">
  120. <TD WIDTH="15%"><B><A HREF="../../javax/mail/UIDFolder.html" title="interface in javax.mail">UIDFolder</A></B></TD>
  121. <TD>The <code>UIDFolder</code> interface is implemented by Folders
  122.  that can support the "disconnected" mode of operation, by providing
  123.  unique-ids for messages in the folder.</TD>
  124. </TR>
  125. </TABLE>
  126. &nbsp;
  127.  
  128. <P>
  129.  
  130. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  131. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  132. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  133. <B>Class Summary</B></FONT></TH>
  134. </TR>
  135. <TR BGCOLOR="white" CLASS="TableRowColor">
  136. <TD WIDTH="15%"><B><A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A></B></TD>
  137. <TD>This abstract class models the addresses in a message.</TD>
  138. </TR>
  139. <TR BGCOLOR="white" CLASS="TableRowColor">
  140. <TD WIDTH="15%"><B><A HREF="../../javax/mail/Authenticator.html" title="class in javax.mail">Authenticator</A></B></TD>
  141. <TD>The class Authenticator represents an object that knows how to obtain
  142.  authentication for a network connection.</TD>
  143. </TR>
  144. <TR BGCOLOR="white" CLASS="TableRowColor">
  145. <TD WIDTH="15%"><B><A HREF="../../javax/mail/BodyPart.html" title="class in javax.mail">BodyPart</A></B></TD>
  146. <TD>This class models a Part that is contained within a Multipart.</TD>
  147. </TR>
  148. <TR BGCOLOR="white" CLASS="TableRowColor">
  149. <TD WIDTH="15%"><B><A HREF="../../javax/mail/FetchProfile.html" title="class in javax.mail">FetchProfile</A></B></TD>
  150. <TD>Clients use a FetchProfile to list the Message attributes that
  151.  it wishes to prefetch from the server for a range of messages.</TD>
  152. </TR>
  153. <TR BGCOLOR="white" CLASS="TableRowColor">
  154. <TD WIDTH="15%"><B><A HREF="../../javax/mail/FetchProfile.Item.html" title="class in javax.mail">FetchProfile.Item</A></B></TD>
  155. <TD>This inner class is the base class of all items that
  156.  can be requested in a FetchProfile.</TD>
  157. </TR>
  158. <TR BGCOLOR="white" CLASS="TableRowColor">
  159. <TD WIDTH="15%"><B><A HREF="../../javax/mail/Flags.html" title="class in javax.mail">Flags</A></B></TD>
  160. <TD>The Flags class represents the set of flags on a Message.</TD>
  161. </TR>
  162. <TR BGCOLOR="white" CLASS="TableRowColor">
  163. <TD WIDTH="15%"><B><A HREF="../../javax/mail/Flags.Flag.html" title="class in javax.mail">Flags.Flag</A></B></TD>
  164. <TD>This inner class represents an individual system flag.</TD>
  165. </TR>
  166. <TR BGCOLOR="white" CLASS="TableRowColor">
  167. <TD WIDTH="15%"><B><A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A></B></TD>
  168. <TD>Folder is an abstract class that represents a folder for mail
  169.  messages.</TD>
  170. </TR>
  171. <TR BGCOLOR="white" CLASS="TableRowColor">
  172. <TD WIDTH="15%"><B><A HREF="../../javax/mail/Header.html" title="class in javax.mail">Header</A></B></TD>
  173. <TD>The Header class stores a name/value pair to represent headers.</TD>
  174. </TR>
  175. <TR BGCOLOR="white" CLASS="TableRowColor">
  176. <TD WIDTH="15%"><B><A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A></B></TD>
  177. <TD>This class models an email message.</TD>
  178. </TR>
  179. <TR BGCOLOR="white" CLASS="TableRowColor">
  180. <TD WIDTH="15%"><B><A HREF="../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType</A></B></TD>
  181. <TD>This inner class defines the types of recipients allowed by
  182.  the Message class.</TD>
  183. </TR>
  184. <TR BGCOLOR="white" CLASS="TableRowColor">
  185. <TD WIDTH="15%"><B><A HREF="../../javax/mail/MessageContext.html" title="class in javax.mail">MessageContext</A></B></TD>
  186. <TD>The context in which a piece of Message content is contained.</TD>
  187. </TR>
  188. <TR BGCOLOR="white" CLASS="TableRowColor">
  189. <TD WIDTH="15%"><B><A HREF="../../javax/mail/Multipart.html" title="class in javax.mail">Multipart</A></B></TD>
  190. <TD>Multipart is a container that holds multiple body parts.</TD>
  191. </TR>
  192. <TR BGCOLOR="white" CLASS="TableRowColor">
  193. <TD WIDTH="15%"><B><A HREF="../../javax/mail/PasswordAuthentication.html" title="class in javax.mail">PasswordAuthentication</A></B></TD>
  194. <TD>The class PasswordAuthentication is a data holder that is used by
  195.  Authenticator.</TD>
  196. </TR>
  197. <TR BGCOLOR="white" CLASS="TableRowColor">
  198. <TD WIDTH="15%"><B><A HREF="../../javax/mail/Provider.html" title="class in javax.mail">Provider</A></B></TD>
  199. <TD>The Provider is a class that describes a protocol
  200.  implementation.</TD>
  201. </TR>
  202. <TR BGCOLOR="white" CLASS="TableRowColor">
  203. <TD WIDTH="15%"><B><A HREF="../../javax/mail/Provider.Type.html" title="class in javax.mail">Provider.Type</A></B></TD>
  204. <TD>This inner class defines the Provider type.</TD>
  205. </TR>
  206. <TR BGCOLOR="white" CLASS="TableRowColor">
  207. <TD WIDTH="15%"><B><A HREF="../../javax/mail/Quota.html" title="class in javax.mail">Quota</A></B></TD>
  208. <TD>This class represents a set of quotas for a given quota root.</TD>
  209. </TR>
  210. <TR BGCOLOR="white" CLASS="TableRowColor">
  211. <TD WIDTH="15%"><B><A HREF="../../javax/mail/Quota.Resource.html" title="class in javax.mail">Quota.Resource</A></B></TD>
  212. <TD>An individual resource in a quota root.</TD>
  213. </TR>
  214. <TR BGCOLOR="white" CLASS="TableRowColor">
  215. <TD WIDTH="15%"><B><A HREF="../../javax/mail/Service.html" title="class in javax.mail">Service</A></B></TD>
  216. <TD>An abstract class that contains the functionality
  217.  common to messaging services, such as stores and transports.</TD>
  218. </TR>
  219. <TR BGCOLOR="white" CLASS="TableRowColor">
  220. <TD WIDTH="15%"><B><A HREF="../../javax/mail/Session.html" title="class in javax.mail">Session</A></B></TD>
  221. <TD>The Session class represents a mail session and is not subclassed.</TD>
  222. </TR>
  223. <TR BGCOLOR="white" CLASS="TableRowColor">
  224. <TD WIDTH="15%"><B><A HREF="../../javax/mail/Store.html" title="class in javax.mail">Store</A></B></TD>
  225. <TD>An abstract class that models a message store and its
  226.  access protocol, for storing and retrieving messages.</TD>
  227. </TR>
  228. <TR BGCOLOR="white" CLASS="TableRowColor">
  229. <TD WIDTH="15%"><B><A HREF="../../javax/mail/Transport.html" title="class in javax.mail">Transport</A></B></TD>
  230. <TD>An abstract class that models a message transport.</TD>
  231. </TR>
  232. <TR BGCOLOR="white" CLASS="TableRowColor">
  233. <TD WIDTH="15%"><B><A HREF="../../javax/mail/UIDFolder.FetchProfileItem.html" title="class in javax.mail">UIDFolder.FetchProfileItem</A></B></TD>
  234. <TD>A fetch profile item for fetching UIDs.</TD>
  235. </TR>
  236. <TR BGCOLOR="white" CLASS="TableRowColor">
  237. <TD WIDTH="15%"><B><A HREF="../../javax/mail/URLName.html" title="class in javax.mail">URLName</A></B></TD>
  238. <TD>The name of a URL.</TD>
  239. </TR>
  240. </TABLE>
  241. &nbsp;
  242.  
  243. <P>
  244.  
  245. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  246. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  247. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  248. <B>Exception Summary</B></FONT></TH>
  249. </TR>
  250. <TR BGCOLOR="white" CLASS="TableRowColor">
  251. <TD WIDTH="15%"><B><A HREF="../../javax/mail/AuthenticationFailedException.html" title="class in javax.mail">AuthenticationFailedException</A></B></TD>
  252. <TD>This exception is thrown when the connect method on a Store or
  253.  Transport object fails due to an authentication failure (e.g.,
  254.  bad user name or password).</TD>
  255. </TR>
  256. <TR BGCOLOR="white" CLASS="TableRowColor">
  257. <TD WIDTH="15%"><B><A HREF="../../javax/mail/FolderClosedException.html" title="class in javax.mail">FolderClosedException</A></B></TD>
  258. <TD>This exception is thrown when a method is invoked on a Messaging object
  259.  and the Folder that owns that object has died due to some reason.</TD>
  260. </TR>
  261. <TR BGCOLOR="white" CLASS="TableRowColor">
  262. <TD WIDTH="15%"><B><A HREF="../../javax/mail/FolderNotFoundException.html" title="class in javax.mail">FolderNotFoundException</A></B></TD>
  263. <TD>This exception is thrown by Folder methods, when those
  264.  methods are invoked on a non existent folder.</TD>
  265. </TR>
  266. <TR BGCOLOR="white" CLASS="TableRowColor">
  267. <TD WIDTH="15%"><B><A HREF="../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></B></TD>
  268. <TD>The exception thrown when a write is attempted on a read-only attribute
  269.  of any Messaging object.</TD>
  270. </TR>
  271. <TR BGCOLOR="white" CLASS="TableRowColor">
  272. <TD WIDTH="15%"><B><A HREF="../../javax/mail/MessageRemovedException.html" title="class in javax.mail">MessageRemovedException</A></B></TD>
  273. <TD>The exception thrown when an invalid method is invoked on an expunged
  274.  Message.</TD>
  275. </TR>
  276. <TR BGCOLOR="white" CLASS="TableRowColor">
  277. <TD WIDTH="15%"><B><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></B></TD>
  278. <TD>The base class for all exceptions thrown by the Messaging classes</TD>
  279. </TR>
  280. <TR BGCOLOR="white" CLASS="TableRowColor">
  281. <TD WIDTH="15%"><B><A HREF="../../javax/mail/MethodNotSupportedException.html" title="class in javax.mail">MethodNotSupportedException</A></B></TD>
  282. <TD>The exception thrown when a method is not supported by the
  283.  implementation</TD>
  284. </TR>
  285. <TR BGCOLOR="white" CLASS="TableRowColor">
  286. <TD WIDTH="15%"><B><A HREF="../../javax/mail/NoSuchProviderException.html" title="class in javax.mail">NoSuchProviderException</A></B></TD>
  287. <TD>This exception is thrown when Session attempts to instantiate a  
  288.  Provider that doesn't exist.</TD>
  289. </TR>
  290. <TR BGCOLOR="white" CLASS="TableRowColor">
  291. <TD WIDTH="15%"><B><A HREF="../../javax/mail/ReadOnlyFolderException.html" title="class in javax.mail">ReadOnlyFolderException</A></B></TD>
  292. <TD>This exception is thrown when an attempt is made to open a folder
  293. read-write access when the folder is marked read-only.</TD>
  294. </TR>
  295. <TR BGCOLOR="white" CLASS="TableRowColor">
  296. <TD WIDTH="15%"><B><A HREF="../../javax/mail/SendFailedException.html" title="class in javax.mail">SendFailedException</A></B></TD>
  297. <TD>This exception is thrown when the message cannot be sent.</TD>
  298. </TR>
  299. <TR BGCOLOR="white" CLASS="TableRowColor">
  300. <TD WIDTH="15%"><B><A HREF="../../javax/mail/StoreClosedException.html" title="class in javax.mail">StoreClosedException</A></B></TD>
  301. <TD>This exception is thrown when a method is invoked on a Messaging object
  302. and the Store that owns that object has died due to some reason.</TD>
  303. </TR>
  304. </TABLE>
  305. &nbsp;
  306.  
  307. <P>
  308. <A NAME="package_description"><!-- --></A><H2>
  309. Package javax.mail Description
  310. </H2>
  311.  
  312. <P>
  313. The JavaMail<sup><font size="-2">TM</font></sup> API
  314. provides classes that model a mail system.
  315. The <code>javax.mail</code> package defines classes that are common to
  316. all mail systems.
  317. The <code>javax.mail.internet</code> package defines classes that are specific
  318. to mail systems based on internet standards such as MIME, SMTP, POP3, and IMAP.
  319. The JavaMail API includes the <code>javax.mail</code> package and subpackages.
  320. <P>
  321. For an overview of the JavaMail API, read the JavaMail specification
  322. <A HREF="../../../JavaMail-1.4.pdf" TARGET="_top">
  323. included in the download bundle</A> or
  324. <A HREF="http://java.sun.com/products/javamail/JavaMail-1.4.pdf" TARGET="_top">
  325. available on the JavaMail web site</A>.
  326. <P>
  327. The code to send a plain text message can be as simple as the following:
  328. <PRE>
  329.    Properties props = new Properties();
  330.    props.put("mail.smtp.host", "my-mail-server");
  331.    props.put("mail.from", "me@example.com");
  332.    Session session = Session.getInstance(props, null);
  333.  
  334.    try {
  335.        MimeMessage msg = new MimeMessage(session);
  336.        msg.setFrom();
  337.        msg.setRecipients(Message.RecipientType.TO,
  338.                          "you@example.com");
  339.        msg.setSubject("JavaMail hello world example");
  340.        msg.setSentDate(new Date());
  341.        msg.setText("Hello, world!\n");
  342.        Transport.send(msg);
  343.    } catch (MessagingException mex) {
  344.        System.out.println("send failed, exception: " + mex);
  345.    }
  346. </PRE>
  347. The JavaMail download bundle contains many more complete examples
  348. in the "demo" directory.
  349. <P>
  350. Don't forget to see the
  351. <A HREF="http://java.sun.com/products/javamail/FAQ.html" TARGET="_top">
  352. JavaMail API FAQ</A>
  353. for answers to the most common questions.
  354. The <A HREF="http://java.sun.com/products/javamail/" TARGET="_top">
  355. JavaMail web site</A>
  356. contains many additional resources.
  357. <P>
  358. The JavaMail API supports the following standard properties,
  359. which may be set in the <code>Session</code> object, or in the
  360. <code>Properties</code> object used to create the <code>Session</code> object.
  361. The properties are always set as strings; the Type column describes
  362. how the string is interpreted.  For example, use
  363. <PRE>
  364.         props.put("mail.debug", "true");
  365. </PRE>
  366. to set the <code>mail.debug</code> property, which is of type boolean.
  367. <P>
  368. <TABLE BORDER>
  369. <TR>
  370. <TH>Name</TH>
  371. <TH>Type</TH>
  372. <TH>Description</TH>
  373. </TR>
  374.  
  375. <TR>
  376. <TD>mail.debug</TD>
  377. <TD>boolean</TD>
  378. <TD>
  379. The initial debug mode.
  380. Default is false.
  381. </TD>
  382. </TR>
  383.  
  384. <TR>
  385. <TD>mail.from</TD>
  386. <TD>String</TD>
  387. <TD>
  388. The return email address of the current user, used by the
  389. <code>InternetAddress</code> method <code>getLocalAddress</code>.
  390. </TD>
  391. </TR>
  392.  
  393. <TR>
  394. <TD>mail.mime.address.strict</TD>
  395. <TD>boolean</TD>
  396. <TD>
  397. The MimeMessage class uses the <code>InternetAddress</code> method
  398. <code>parseHeader</code> to parse headers in messages.  This property
  399. controls the strict flag passed to the <code>parseHeader</code>
  400. method.  The default is true.
  401. </TD>
  402. </TR>
  403.  
  404. <TR>
  405. <TD>mail.host</TD>
  406. <TD>String</TD>
  407. <TD>
  408. The default host name of the mail server for both Stores and Transports.
  409. Used if the <code>mail.<i>protocol</i>.host</code> property isn't set.
  410. </TD>
  411. </TR>
  412.  
  413. <TR>
  414. <TD>mail.store.protocol</TD>
  415. <TD>String</TD>
  416. <TD>
  417. Specifies the default message access protocol.  The
  418. <code>Session</code> method <code>getStore()</code> returns a Store
  419. object that implements this protocol.  By default the first Store
  420. provider in the configuration files is returned.
  421. </TD>
  422. </TR>
  423.  
  424. <TR>
  425. <TD>mail.transport.protocol</TD>
  426. <TD>String</TD>
  427. <TD>
  428. Specifies the default message transport protocol.  The
  429. <code>Session</code> method <code>getTransport()</code> returns a Transport
  430. object that implements this protocol.  By default the first Transport
  431. provider in the configuration files is returned.
  432. </TD>
  433. </TR>
  434.  
  435. <TR>
  436. <TD>mail.user</TD>
  437. <TD>String</TD>
  438. <TD>
  439. The default user name to use when connecting to the mail server.
  440. Used if the <code>mail.<i>protocol</i>.user</code> property isn't set.
  441. </TD>
  442. </TR>
  443.  
  444. <TR>
  445. <TD>mail.<i>protocol</i>.class</TD>
  446. <TD>String</TD>
  447. <TD>
  448. Specifies the fully qualified class name of the provider for the
  449. specified protocol.  Used in cases where more than one provider
  450. for a given protocol exists; this property can be used to specify
  451. which provider to use by default.  The provider must still be listed
  452. in a configuration file.
  453. </TD>
  454. </TR>
  455.  
  456. <TR>
  457. <TD>mail.<i>protocol</i>.host</TD>
  458. <TD>String</TD>
  459. <TD>
  460. The host name of the mail server for the specified protocol.
  461. Overrides the <code>mail.host</code> property.
  462. </TD>
  463. </TR>
  464.  
  465. <TR>
  466. <TD>mail.<i>protocol</i>.port</TD>
  467. <TD>int</TD>
  468. <TD>
  469. The port number of the mail server for the specified protocol.
  470. If not specified the protocol's default port number is used.
  471. </TD>
  472. </TR>
  473.  
  474. <TR>
  475. <TD>mail.<i>protocol</i>.user</TD>
  476. <TD>String</TD>
  477. <TD>
  478. The user name to use when connecting to mail servers
  479. using the specified protocol.
  480. Overrides the <code>mail.user</code> property.
  481. </TD>
  482. </TR>
  483.  
  484. </TABLE>
  485.  
  486. <P>
  487. The following properties are supported by Sun's implementation of
  488. JavaMail, but are not currently a required part of the specification.
  489. The names, types, defaults, and semantics of these properties may
  490. change in future releases.
  491. <P>
  492. <TABLE BORDER>
  493. <TR>
  494. <TH>Name</TH>
  495. <TH>Type</TH>
  496. <TH>Description</TH>
  497. </TR>
  498.  
  499. <TR>
  500. <TD>mail.transport.protocol.<i>address-type</i></TD>
  501. <TD>String</TD>
  502. <TD>
  503. Specifies the default message transport protocol for the specified address type.
  504. The <code>Session</code> method <code>getTransport(Address)</code> returns a
  505. Transport object that implements this protocol when the address is of the
  506. specified type (e.g., "rfc822" for standard internet addresses).
  507. By default the first Transport configured for that address type is used.
  508. This property can be used to override the behavior of the
  509. <A HREF="../../javax/mail/Transport.html#send(javax.mail.Message)"><CODE>send</CODE></A> method of the
  510. <A HREF="../../javax/mail/Transport.html" title="class in javax.mail"><CODE>Transport</CODE></A> class so that (for example) the "smtps"
  511. protocol is used instead of the "smtp" protocol by setting the property
  512. <code>mail.transport.protocol.rfc822</code> to <code>"smtps"</code>.
  513. </TD>
  514. </TR>
  515.  
  516. </TABLE>
  517.  
  518. <P>
  519. The JavaMail API also supports several System properties;
  520. see the <A HREF="../../javax/mail/internet/package-summary.html"><CODE>javax.mail.internet</CODE></A> package documentation
  521. for details.
  522.  
  523. <P>
  524. The JavaMail reference
  525. implementation from Sun includes protocol providers in subpackages of
  526. <code>com.sun.mail</code>.  Note that the APIs to these protocol
  527. providers are not part of the standard JavaMail API.  Portable
  528. programs will not use these APIs.
  529. <P>
  530. Nonportable programs may use the APIs of the Sun protocol providers
  531. by (for example) casting a returned <code>Folder</code> object to a
  532. <code>com.sun.mail.imap.IMAPFolder</code> object.  Similarly for
  533. <code>Store</code> and <code>Message</code> objects returned from the
  534. standard JavaMail APIs.
  535. <P>
  536. The Sun protocol providers also support properties that are specific to
  537. those providers.  The package documentation for the
  538. <A HREF="../../com/sun/mail/imap/package-summary.html"><CODE>IMAP</CODE></A>, <A HREF="../../com/sun/mail/pop3/package-summary.html"><CODE>POP3</CODE></A>,
  539. and <A HREF="../../com/sun/mail/smtp/package-summary.html"><CODE>SMTP</CODE></A> packages provide details.
  540. <P>
  541.  
  542. <P>
  543. <DL>
  544. </DL>
  545. <HR>
  546.  
  547.  
  548. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  549. <A NAME="navbar_bottom"><!-- --></A>
  550. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  551. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  552. <TR>
  553. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  554. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  555. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  556.   <TR ALIGN="center" VALIGN="top">
  557.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  558.   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
  559.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
  560.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  561.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  562.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  563.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  564.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  565.   </TR>
  566. </TABLE>
  567. </TD>
  568. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  569. </EM>
  570. </TD>
  571. </TR>
  572.  
  573. <TR>
  574. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  575. &nbsp;<A HREF="../../com/sun/mail/util/logging/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp;
  576. &nbsp;<A HREF="../../javax/mail/event/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
  577. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  578.   <A HREF="../../index.html?javax/mail/package-summary.html" target="_top"><B>FRAMES</B></A>  &nbsp;
  579. &nbsp;<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
  580. &nbsp;<SCRIPT type="text/javascript">
  581.   <!--
  582.   if(window==top) {
  583.     document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
  584.   }
  585.   //-->
  586. </SCRIPT>
  587. <NOSCRIPT>
  588.   <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
  589. </NOSCRIPT>
  590.  
  591.  
  592. </FONT></TD>
  593. </TR>
  594. </TABLE>
  595. <A NAME="skip-navbar_bottom"></A>
  596. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  597.  
  598. <HR>
  599. Copyright &#169; 2009 <a href="http://www.sun.com">Sun Microsystems, Inc.</a>. All Rights Reserved.
  600. </BODY>
  601. </HTML>
  602.