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:38 PST 2009 -->
  6. <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  7. <TITLE>
  8. Message (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="Message (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="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  43.   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  44.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Message.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="../../javax/mail/IllegalWriteException.html" title="class in javax.mail"><B>PREV CLASS</B></A>&nbsp;
  60. &nbsp;<A HREF="../../javax/mail/Message.RecipientType.html" title="class in javax.mail"><B>NEXT CLASS</B></A></FONT></TD>
  61. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  62.   <A HREF="../../index.html?javax/mail/Message.html" target="_top"><B>FRAMES</B></A>  &nbsp;
  63. &nbsp;<A HREF="Message.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. <TR>
  79. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  80.   SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  81. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  82. DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  83. </TR>
  84. </TABLE>
  85. <A NAME="skip-navbar_top"></A>
  86. <!-- ========= END OF TOP NAVBAR ========= -->
  87.  
  88. <HR>
  89. <!-- ======== START OF CLASS DATA ======== -->
  90. <H2>
  91. <FONT SIZE="-1">
  92. javax.mail</FONT>
  93. <BR>
  94. Class Message</H2>
  95. <PRE>
  96. <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
  97.   <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>javax.mail.Message</B>
  98. </PRE>
  99. <DL>
  100. <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../javax/mail/Part.html" title="interface in javax.mail">Part</A></DD>
  101. </DL>
  102. <DL>
  103. <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../javax/mail/internet/MimeMessage.html" title="class in javax.mail.internet">MimeMessage</A></DD>
  104. </DL>
  105. <HR>
  106. <DL>
  107. <DT><PRE>public abstract class <B>Message</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A><DT>implements <A HREF="../../javax/mail/Part.html" title="interface in javax.mail">Part</A></DL>
  108. </PRE>
  109.  
  110. <P>
  111. This class models an email message. This is an abstract class.  
  112.  Subclasses provide actual implementations. <p>
  113.  
  114.  Message implements the Part interface. Message contains a set of
  115.  attributes and a "content". Messages within a folder also have a
  116.  set of flags that describe its state within the folder.<p>
  117.  
  118.  Message defines some new attributes in addition to those defined
  119.  in the <code>Part</code> interface. These attributes specify meta-data
  120.  for the message - i.e., addressing  and descriptive information about
  121.  the message. <p>
  122.  
  123.  Message objects are obtained either from a Folder or by constructing
  124.  a new Message object of the appropriate subclass. Messages that have
  125.  been received are normally retrieved from a folder named "INBOX". <p>
  126.  
  127.  A Message object obtained from a folder is just a lightweight
  128.  reference to the actual message. The Message is 'lazily' filled
  129.  up (on demand) when each item is requested from the message. Note
  130.  that certain folder implementations may return Message objects that
  131.  are pre-filled with certain user-specified items.
  132.  
  133.  To send a message, an appropriate subclass of Message (e.g.,
  134.  MimeMessage) is instantiated, the attributes and content are
  135.  filled in, and the message is sent using the <code>Transport.send</code>
  136.  method. <p>
  137. <P>
  138.  
  139. <P>
  140. <DL>
  141. <DT><B>See Also:</B><DD><A HREF="../../javax/mail/Part.html" title="interface in javax.mail"><CODE>Part</CODE></A></DL>
  142. <HR>
  143.  
  144. <P>
  145. <!-- ======== NESTED CLASS SUMMARY ======== -->
  146.  
  147. <A NAME="nested_class_summary"><!-- --></A>
  148. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  149. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  150. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  151. <B>Nested Class Summary</B></FONT></TH>
  152. </TR>
  153. <TR BGCOLOR="white" CLASS="TableRowColor">
  154. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  155. <CODE>static&nbsp;class</CODE></FONT></TD>
  156. <TD><CODE><B><A HREF="../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType</A></B></CODE>
  157.  
  158. <BR>
  159. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This inner class defines the types of recipients allowed by
  160.  the Message class.</TD>
  161. </TR>
  162. </TABLE>
  163. &nbsp;<!-- =========== FIELD SUMMARY =========== -->
  164.  
  165. <A NAME="field_summary"><!-- --></A>
  166. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  167. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  168. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  169. <B>Field Summary</B></FONT></TH>
  170. </TR>
  171. <TR BGCOLOR="white" CLASS="TableRowColor">
  172. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  173. <CODE>protected &nbsp;boolean</CODE></FONT></TD>
  174. <TD><CODE><B><A HREF="../../javax/mail/Message.html#expunged">expunged</A></B></CODE>
  175.  
  176. <BR>
  177. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;True if this message has been expunged.</TD>
  178. </TR>
  179. <TR BGCOLOR="white" CLASS="TableRowColor">
  180. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  181. <CODE>protected &nbsp;<A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A></CODE></FONT></TD>
  182. <TD><CODE><B><A HREF="../../javax/mail/Message.html#folder">folder</A></B></CODE>
  183.  
  184. <BR>
  185. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The containing folder, if this message is obtained from a folder</TD>
  186. </TR>
  187. <TR BGCOLOR="white" CLASS="TableRowColor">
  188. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  189. <CODE>protected &nbsp;int</CODE></FONT></TD>
  190. <TD><CODE><B><A HREF="../../javax/mail/Message.html#msgnum">msgnum</A></B></CODE>
  191.  
  192. <BR>
  193. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The number of this message within its folder, or zero if
  194.  the message was not retrieved from a folder.</TD>
  195. </TR>
  196. <TR BGCOLOR="white" CLASS="TableRowColor">
  197. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  198. <CODE>protected &nbsp;<A HREF="../../javax/mail/Session.html" title="class in javax.mail">Session</A></CODE></FONT></TD>
  199. <TD><CODE><B><A HREF="../../javax/mail/Message.html#session">session</A></B></CODE>
  200.  
  201. <BR>
  202. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The Session object for this Message</TD>
  203. </TR>
  204. </TABLE>
  205. &nbsp;<A NAME="fields_inherited_from_class_javax.mail.Part"><!-- --></A>
  206. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  207. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  208. <TH ALIGN="left"><B>Fields inherited from interface javax.mail.<A HREF="../../javax/mail/Part.html" title="interface in javax.mail">Part</A></B></TH>
  209. </TR>
  210. <TR BGCOLOR="white" CLASS="TableRowColor">
  211. <TD><CODE><A HREF="../../javax/mail/Part.html#ATTACHMENT">ATTACHMENT</A>, <A HREF="../../javax/mail/Part.html#INLINE">INLINE</A></CODE></TD>
  212. </TR>
  213. </TABLE>
  214. &nbsp;
  215. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  216.  
  217. <A NAME="constructor_summary"><!-- --></A>
  218. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  219. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  220. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  221. <B>Constructor Summary</B></FONT></TH>
  222. </TR>
  223. <TR BGCOLOR="white" CLASS="TableRowColor">
  224. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  225. <CODE>protected </CODE></FONT></TD>
  226. <TD><CODE><B><A HREF="../../javax/mail/Message.html#Message()">Message</A></B>()</CODE>
  227.  
  228. <BR>
  229. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;No-arg version of the constructor.</TD>
  230. </TR>
  231. <TR BGCOLOR="white" CLASS="TableRowColor">
  232. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  233. <CODE>protected </CODE></FONT></TD>
  234. <TD><CODE><B><A HREF="../../javax/mail/Message.html#Message(javax.mail.Folder, int)">Message</A></B>(<A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>&nbsp;folder,
  235.         int&nbsp;msgnum)</CODE>
  236.  
  237. <BR>
  238. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor that takes a Folder and a message number.</TD>
  239. </TR>
  240. <TR BGCOLOR="white" CLASS="TableRowColor">
  241. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  242. <CODE>protected </CODE></FONT></TD>
  243. <TD><CODE><B><A HREF="../../javax/mail/Message.html#Message(javax.mail.Session)">Message</A></B>(<A HREF="../../javax/mail/Session.html" title="class in javax.mail">Session</A>&nbsp;session)</CODE>
  244.  
  245. <BR>
  246. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor that takes a Session.</TD>
  247. </TR>
  248. </TABLE>
  249. &nbsp;
  250. <!-- ========== METHOD SUMMARY =========== -->
  251.  
  252. <A NAME="method_summary"><!-- --></A>
  253. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  254. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  255. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  256. <B>Method Summary</B></FONT></TH>
  257. </TR>
  258. <TR BGCOLOR="white" CLASS="TableRowColor">
  259. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  260. <CODE>abstract &nbsp;void</CODE></FONT></TD>
  261. <TD><CODE><B><A HREF="../../javax/mail/Message.html#addFrom(javax.mail.Address[])">addFrom</A></B>(<A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A>[]&nbsp;addresses)</CODE>
  262.  
  263. <BR>
  264. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add these addresses to the existing "From" attribute</TD>
  265. </TR>
  266. <TR BGCOLOR="white" CLASS="TableRowColor">
  267. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  268. <CODE>&nbsp;void</CODE></FONT></TD>
  269. <TD><CODE><B><A HREF="../../javax/mail/Message.html#addRecipient(javax.mail.Message.RecipientType, javax.mail.Address)">addRecipient</A></B>(<A HREF="../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType</A>&nbsp;type,
  270.              <A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A>&nbsp;address)</CODE>
  271.  
  272. <BR>
  273. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add this recipient address to the existing ones of the given type.</TD>
  274. </TR>
  275. <TR BGCOLOR="white" CLASS="TableRowColor">
  276. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  277. <CODE>abstract &nbsp;void</CODE></FONT></TD>
  278. <TD><CODE><B><A HREF="../../javax/mail/Message.html#addRecipients(javax.mail.Message.RecipientType, javax.mail.Address[])">addRecipients</A></B>(<A HREF="../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType</A>&nbsp;type,
  279.               <A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A>[]&nbsp;addresses)</CODE>
  280.  
  281. <BR>
  282. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add these recipient addresses to the existing ones of the given type.</TD>
  283. </TR>
  284. <TR BGCOLOR="white" CLASS="TableRowColor">
  285. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  286. <CODE>&nbsp;<A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A>[]</CODE></FONT></TD>
  287. <TD><CODE><B><A HREF="../../javax/mail/Message.html#getAllRecipients()">getAllRecipients</A></B>()</CODE>
  288.  
  289. <BR>
  290. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get all the recipient addresses for the message.</TD>
  291. </TR>
  292. <TR BGCOLOR="white" CLASS="TableRowColor">
  293. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  294. <CODE>abstract &nbsp;<A HREF="../../javax/mail/Flags.html" title="class in javax.mail">Flags</A></CODE></FONT></TD>
  295. <TD><CODE><B><A HREF="../../javax/mail/Message.html#getFlags()">getFlags</A></B>()</CODE>
  296.  
  297. <BR>
  298. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <code>Flags</code> object containing the flags for
  299.  this message.</TD>
  300. </TR>
  301. <TR BGCOLOR="white" CLASS="TableRowColor">
  302. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  303. <CODE>&nbsp;<A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A></CODE></FONT></TD>
  304. <TD><CODE><B><A HREF="../../javax/mail/Message.html#getFolder()">getFolder</A></B>()</CODE>
  305.  
  306. <BR>
  307. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the folder from which this message was obtained.</TD>
  308. </TR>
  309. <TR BGCOLOR="white" CLASS="TableRowColor">
  310. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  311. <CODE>abstract &nbsp;<A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A>[]</CODE></FONT></TD>
  312. <TD><CODE><B><A HREF="../../javax/mail/Message.html#getFrom()">getFrom</A></B>()</CODE>
  313.  
  314. <BR>
  315. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the "From" attribute.</TD>
  316. </TR>
  317. <TR BGCOLOR="white" CLASS="TableRowColor">
  318. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  319. <CODE>&nbsp;int</CODE></FONT></TD>
  320. <TD><CODE><B><A HREF="../../javax/mail/Message.html#getMessageNumber()">getMessageNumber</A></B>()</CODE>
  321.  
  322. <BR>
  323. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the Message number for this Message.</TD>
  324. </TR>
  325. <TR BGCOLOR="white" CLASS="TableRowColor">
  326. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  327. <CODE>abstract &nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</A></CODE></FONT></TD>
  328. <TD><CODE><B><A HREF="../../javax/mail/Message.html#getReceivedDate()">getReceivedDate</A></B>()</CODE>
  329.  
  330. <BR>
  331. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the date this message was received.</TD>
  332. </TR>
  333. <TR BGCOLOR="white" CLASS="TableRowColor">
  334. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  335. <CODE>abstract &nbsp;<A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A>[]</CODE></FONT></TD>
  336. <TD><CODE><B><A HREF="../../javax/mail/Message.html#getRecipients(javax.mail.Message.RecipientType)">getRecipients</A></B>(<A HREF="../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType</A>&nbsp;type)</CODE>
  337.  
  338. <BR>
  339. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get all the recipient addresses of the given type.</TD>
  340. </TR>
  341. <TR BGCOLOR="white" CLASS="TableRowColor">
  342. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  343. <CODE>&nbsp;<A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A>[]</CODE></FONT></TD>
  344. <TD><CODE><B><A HREF="../../javax/mail/Message.html#getReplyTo()">getReplyTo</A></B>()</CODE>
  345.  
  346. <BR>
  347. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the addresses to which replies should be directed.</TD>
  348. </TR>
  349. <TR BGCOLOR="white" CLASS="TableRowColor">
  350. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  351. <CODE>abstract &nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</A></CODE></FONT></TD>
  352. <TD><CODE><B><A HREF="../../javax/mail/Message.html#getSentDate()">getSentDate</A></B>()</CODE>
  353.  
  354. <BR>
  355. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the date this message was sent.</TD>
  356. </TR>
  357. <TR BGCOLOR="white" CLASS="TableRowColor">
  358. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  359. <CODE>abstract &nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
  360. <TD><CODE><B><A HREF="../../javax/mail/Message.html#getSubject()">getSubject</A></B>()</CODE>
  361.  
  362. <BR>
  363. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the subject of this message.</TD>
  364. </TR>
  365. <TR BGCOLOR="white" CLASS="TableRowColor">
  366. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  367. <CODE>&nbsp;boolean</CODE></FONT></TD>
  368. <TD><CODE><B><A HREF="../../javax/mail/Message.html#isExpunged()">isExpunged</A></B>()</CODE>
  369.  
  370. <BR>
  371. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks whether this message is expunged.</TD>
  372. </TR>
  373. <TR BGCOLOR="white" CLASS="TableRowColor">
  374. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  375. <CODE>&nbsp;boolean</CODE></FONT></TD>
  376. <TD><CODE><B><A HREF="../../javax/mail/Message.html#isSet(javax.mail.Flags.Flag)">isSet</A></B>(<A HREF="../../javax/mail/Flags.Flag.html" title="class in javax.mail">Flags.Flag</A>&nbsp;flag)</CODE>
  377.  
  378. <BR>
  379. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Check whether the flag specified in the <code>flag</code>
  380.  argument is set in this message.</TD>
  381. </TR>
  382. <TR BGCOLOR="white" CLASS="TableRowColor">
  383. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  384. <CODE>&nbsp;boolean</CODE></FONT></TD>
  385. <TD><CODE><B><A HREF="../../javax/mail/Message.html#match(javax.mail.search.SearchTerm)">match</A></B>(<A HREF="../../javax/mail/search/SearchTerm.html" title="class in javax.mail.search">SearchTerm</A>&nbsp;term)</CODE>
  386.  
  387. <BR>
  388. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Apply the specified Search criterion to this message.</TD>
  389. </TR>
  390. <TR BGCOLOR="white" CLASS="TableRowColor">
  391. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  392. <CODE>abstract &nbsp;<A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A></CODE></FONT></TD>
  393. <TD><CODE><B><A HREF="../../javax/mail/Message.html#reply(boolean)">reply</A></B>(boolean&nbsp;replyToAll)</CODE>
  394.  
  395. <BR>
  396. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a new Message suitable for a reply to this message.</TD>
  397. </TR>
  398. <TR BGCOLOR="white" CLASS="TableRowColor">
  399. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  400. <CODE>abstract &nbsp;void</CODE></FONT></TD>
  401. <TD><CODE><B><A HREF="../../javax/mail/Message.html#saveChanges()">saveChanges</A></B>()</CODE>
  402.  
  403. <BR>
  404. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Save any changes made to this message into the message-store
  405.  when the containing folder is closed, if the message is contained
  406.  in a folder.</TD>
  407. </TR>
  408. <TR BGCOLOR="white" CLASS="TableRowColor">
  409. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  410. <CODE>protected &nbsp;void</CODE></FONT></TD>
  411. <TD><CODE><B><A HREF="../../javax/mail/Message.html#setExpunged(boolean)">setExpunged</A></B>(boolean&nbsp;expunged)</CODE>
  412.  
  413. <BR>
  414. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the expunged flag for this Message.</TD>
  415. </TR>
  416. <TR BGCOLOR="white" CLASS="TableRowColor">
  417. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  418. <CODE>&nbsp;void</CODE></FONT></TD>
  419. <TD><CODE><B><A HREF="../../javax/mail/Message.html#setFlag(javax.mail.Flags.Flag, boolean)">setFlag</A></B>(<A HREF="../../javax/mail/Flags.Flag.html" title="class in javax.mail">Flags.Flag</A>&nbsp;flag,
  420.         boolean&nbsp;set)</CODE>
  421.  
  422. <BR>
  423. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the specified flag on this message to the specified value.</TD>
  424. </TR>
  425. <TR BGCOLOR="white" CLASS="TableRowColor">
  426. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  427. <CODE>abstract &nbsp;void</CODE></FONT></TD>
  428. <TD><CODE><B><A HREF="../../javax/mail/Message.html#setFlags(javax.mail.Flags, boolean)">setFlags</A></B>(<A HREF="../../javax/mail/Flags.html" title="class in javax.mail">Flags</A>&nbsp;flag,
  429.          boolean&nbsp;set)</CODE>
  430.  
  431. <BR>
  432. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the specified flags on this message to the specified value.</TD>
  433. </TR>
  434. <TR BGCOLOR="white" CLASS="TableRowColor">
  435. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  436. <CODE>abstract &nbsp;void</CODE></FONT></TD>
  437. <TD><CODE><B><A HREF="../../javax/mail/Message.html#setFrom()">setFrom</A></B>()</CODE>
  438.  
  439. <BR>
  440. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the "From" attribute in this Message.</TD>
  441. </TR>
  442. <TR BGCOLOR="white" CLASS="TableRowColor">
  443. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  444. <CODE>abstract &nbsp;void</CODE></FONT></TD>
  445. <TD><CODE><B><A HREF="../../javax/mail/Message.html#setFrom(javax.mail.Address)">setFrom</A></B>(<A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A>&nbsp;address)</CODE>
  446.  
  447. <BR>
  448. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the "From" attribute in this Message.</TD>
  449. </TR>
  450. <TR BGCOLOR="white" CLASS="TableRowColor">
  451. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  452. <CODE>protected &nbsp;void</CODE></FONT></TD>
  453. <TD><CODE><B><A HREF="../../javax/mail/Message.html#setMessageNumber(int)">setMessageNumber</A></B>(int&nbsp;msgnum)</CODE>
  454.  
  455. <BR>
  456. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the Message number for this Message.</TD>
  457. </TR>
  458. <TR BGCOLOR="white" CLASS="TableRowColor">
  459. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  460. <CODE>&nbsp;void</CODE></FONT></TD>
  461. <TD><CODE><B><A HREF="../../javax/mail/Message.html#setRecipient(javax.mail.Message.RecipientType, javax.mail.Address)">setRecipient</A></B>(<A HREF="../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType</A>&nbsp;type,
  462.              <A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A>&nbsp;address)</CODE>
  463.  
  464. <BR>
  465. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the recipient address.</TD>
  466. </TR>
  467. <TR BGCOLOR="white" CLASS="TableRowColor">
  468. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  469. <CODE>abstract &nbsp;void</CODE></FONT></TD>
  470. <TD><CODE><B><A HREF="../../javax/mail/Message.html#setRecipients(javax.mail.Message.RecipientType, javax.mail.Address[])">setRecipients</A></B>(<A HREF="../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType</A>&nbsp;type,
  471.               <A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A>[]&nbsp;addresses)</CODE>
  472.  
  473. <BR>
  474. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the recipient addresses.</TD>
  475. </TR>
  476. <TR BGCOLOR="white" CLASS="TableRowColor">
  477. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  478. <CODE>&nbsp;void</CODE></FONT></TD>
  479. <TD><CODE><B><A HREF="../../javax/mail/Message.html#setReplyTo(javax.mail.Address[])">setReplyTo</A></B>(<A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A>[]&nbsp;addresses)</CODE>
  480.  
  481. <BR>
  482. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the addresses to which replies should be directed.</TD>
  483. </TR>
  484. <TR BGCOLOR="white" CLASS="TableRowColor">
  485. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  486. <CODE>abstract &nbsp;void</CODE></FONT></TD>
  487. <TD><CODE><B><A HREF="../../javax/mail/Message.html#setSentDate(java.util.Date)">setSentDate</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</A>&nbsp;date)</CODE>
  488.  
  489. <BR>
  490. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the sent date of this message.</TD>
  491. </TR>
  492. <TR BGCOLOR="white" CLASS="TableRowColor">
  493. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  494. <CODE>abstract &nbsp;void</CODE></FONT></TD>
  495. <TD><CODE><B><A HREF="../../javax/mail/Message.html#setSubject(java.lang.String)">setSubject</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;subject)</CODE>
  496.  
  497. <BR>
  498. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the subject of this message.</TD>
  499. </TR>
  500. </TABLE>
  501. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  502. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  503. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  504. <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
  505. </TR>
  506. <TR BGCOLOR="white" CLASS="TableRowColor">
  507. <TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
  508. </TR>
  509. </TABLE>
  510. &nbsp;<A NAME="methods_inherited_from_class_javax.mail.Part"><!-- --></A>
  511. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  512. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  513. <TH ALIGN="left"><B>Methods inherited from interface javax.mail.<A HREF="../../javax/mail/Part.html" title="interface in javax.mail">Part</A></B></TH>
  514. </TR>
  515. <TR BGCOLOR="white" CLASS="TableRowColor">
  516. <TD><CODE><A HREF="../../javax/mail/Part.html#addHeader(java.lang.String, java.lang.String)">addHeader</A>, <A HREF="../../javax/mail/Part.html#getAllHeaders()">getAllHeaders</A>, <A HREF="../../javax/mail/Part.html#getContent()">getContent</A>, <A HREF="../../javax/mail/Part.html#getContentType()">getContentType</A>, <A HREF="../../javax/mail/Part.html#getDataHandler()">getDataHandler</A>, <A HREF="../../javax/mail/Part.html#getDescription()">getDescription</A>, <A HREF="../../javax/mail/Part.html#getDisposition()">getDisposition</A>, <A HREF="../../javax/mail/Part.html#getFileName()">getFileName</A>, <A HREF="../../javax/mail/Part.html#getHeader(java.lang.String)">getHeader</A>, <A HREF="../../javax/mail/Part.html#getInputStream()">getInputStream</A>, <A HREF="../../javax/mail/Part.html#getLineCount()">getLineCount</A>, <A HREF="../../javax/mail/Part.html#getMatchingHeaders(java.lang.String[])">getMatchingHeaders</A>, <A HREF="../../javax/mail/Part.html#getNonMatchingHeaders(java.lang.String[])">getNonMatchingHeaders</A>, <A HREF="../../javax/mail/Part.html#getSize()">getSize</A>, <A HREF="../../javax/mail/Part.html#isMimeType(java.lang.String)">isMimeType</A>, <A HREF="../../javax/mail/Part.html#removeHeader(java.lang.String)">removeHeader</A>, <A HREF="../../javax/mail/Part.html#setContent(javax.mail.Multipart)">setContent</A>, <A HREF="../../javax/mail/Part.html#setContent(java.lang.Object, java.lang.String)">setContent</A>, <A HREF="../../javax/mail/Part.html#setDataHandler(javax.activation.DataHandler)">setDataHandler</A>, <A HREF="../../javax/mail/Part.html#setDescription(java.lang.String)">setDescription</A>, <A HREF="../../javax/mail/Part.html#setDisposition(java.lang.String)">setDisposition</A>, <A HREF="../../javax/mail/Part.html#setFileName(java.lang.String)">setFileName</A>, <A HREF="../../javax/mail/Part.html#setHeader(java.lang.String, java.lang.String)">setHeader</A>, <A HREF="../../javax/mail/Part.html#setText(java.lang.String)">setText</A>, <A HREF="../../javax/mail/Part.html#writeTo(java.io.OutputStream)">writeTo</A></CODE></TD>
  517. </TR>
  518. </TABLE>
  519. &nbsp;
  520. <P>
  521.  
  522. <!-- ============ FIELD DETAIL =========== -->
  523.  
  524. <A NAME="field_detail"><!-- --></A>
  525. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  526. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  527. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  528. <B>Field Detail</B></FONT></TH>
  529. </TR>
  530. </TABLE>
  531.  
  532. <A NAME="msgnum"><!-- --></A><H3>
  533. msgnum</H3>
  534. <PRE>
  535. protected int <B>msgnum</B></PRE>
  536. <DL>
  537. <DD>The number of this message within its folder, or zero if
  538.  the message was not retrieved from a folder.
  539. <P>
  540. <DL>
  541. </DL>
  542. </DL>
  543. <HR>
  544.  
  545. <A NAME="expunged"><!-- --></A><H3>
  546. expunged</H3>
  547. <PRE>
  548. protected boolean <B>expunged</B></PRE>
  549. <DL>
  550. <DD>True if this message has been expunged.
  551. <P>
  552. <DL>
  553. </DL>
  554. </DL>
  555. <HR>
  556.  
  557. <A NAME="folder"><!-- --></A><H3>
  558. folder</H3>
  559. <PRE>
  560. protected <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A> <B>folder</B></PRE>
  561. <DL>
  562. <DD>The containing folder, if this message is obtained from a folder
  563. <P>
  564. <DL>
  565. </DL>
  566. </DL>
  567. <HR>
  568.  
  569. <A NAME="session"><!-- --></A><H3>
  570. session</H3>
  571. <PRE>
  572. protected <A HREF="../../javax/mail/Session.html" title="class in javax.mail">Session</A> <B>session</B></PRE>
  573. <DL>
  574. <DD>The Session object for this Message
  575. <P>
  576. <DL>
  577. </DL>
  578. </DL>
  579.  
  580. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  581.  
  582. <A NAME="constructor_detail"><!-- --></A>
  583. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  584. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  585. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  586. <B>Constructor Detail</B></FONT></TH>
  587. </TR>
  588. </TABLE>
  589.  
  590. <A NAME="Message()"><!-- --></A><H3>
  591. Message</H3>
  592. <PRE>
  593. protected <B>Message</B>()</PRE>
  594. <DL>
  595. <DD>No-arg version of the constructor.
  596. <P>
  597. </DL>
  598. <HR>
  599.  
  600. <A NAME="Message(javax.mail.Folder, int)"><!-- --></A><H3>
  601. Message</H3>
  602. <PRE>
  603. protected <B>Message</B>(<A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A>&nbsp;folder,
  604.                   int&nbsp;msgnum)</PRE>
  605. <DL>
  606. <DD>Constructor that takes a Folder and a message number.
  607.  Used by Folder implementations.
  608. <P>
  609. <DL>
  610. <DT><B>Parameters:</B><DD><CODE>folder</CODE> - containing folder<DD><CODE>msgnum</CODE> - this message's sequence number within this folder</DL>
  611. </DL>
  612. <HR>
  613.  
  614. <A NAME="Message(javax.mail.Session)"><!-- --></A><H3>
  615. Message</H3>
  616. <PRE>
  617. protected <B>Message</B>(<A HREF="../../javax/mail/Session.html" title="class in javax.mail">Session</A>&nbsp;session)</PRE>
  618. <DL>
  619. <DD>Constructor that takes a Session. Used for client created
  620. Message objects.
  621. <P>
  622. <DL>
  623. <DT><B>Parameters:</B><DD><CODE>session</CODE> - A Session object</DL>
  624. </DL>
  625.  
  626. <!-- ============ METHOD DETAIL ========== -->
  627.  
  628. <A NAME="method_detail"><!-- --></A>
  629. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  630. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  631. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  632. <B>Method Detail</B></FONT></TH>
  633. </TR>
  634. </TABLE>
  635.  
  636. <A NAME="getFrom()"><!-- --></A><H3>
  637. getFrom</H3>
  638. <PRE>
  639. public abstract <A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A>[] <B>getFrom</B>()
  640.                           throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  641. <DL>
  642. <DD>Returns the "From" attribute. The "From" attribute contains
  643. the identity of the person(s) who wished this message to
  644. be sent. <p>
  645.  
  646. In certain implementations, this may be different
  647. from the entity that actually sent the message. <p>
  648.  
  649. This method returns <code>null</code> if this attribute
  650. is not present in this message. Returns an empty array if
  651. this attribute is present, but contains no addresses.
  652. <P>
  653. <DD><DL>
  654. </DL>
  655. </DD>
  656. <DD><DL>
  657.  
  658. <DT><B>Returns:</B><DD>array of Address objects
  659. <DT><B>Throws:</B>
  660. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  661. </DD>
  662. </DL>
  663. <HR>
  664.  
  665. <A NAME="setFrom()"><!-- --></A><H3>
  666. setFrom</H3>
  667. <PRE>
  668. public abstract void <B>setFrom</B>()
  669.                      throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  670. <DL>
  671. <DD>Set the "From" attribute in this Message. The value of this
  672. attribute is obtained from the property "mail.user". If this
  673. property is absent, the system property "user.name" is used.
  674. <P>
  675. <DD><DL>
  676. </DL>
  677. </DD>
  678. <DD><DL>
  679.  
  680. <DT><B>Throws:</B>
  681. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE>
  682. <DD><CODE><A HREF="../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  683.                        implementation does not support modification
  684.                        of existing values
  685. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this message is
  686.                        obtained from a READ_ONLY folder.</DL>
  687. </DD>
  688. </DL>
  689. <HR>
  690.  
  691. <A NAME="setFrom(javax.mail.Address)"><!-- --></A><H3>
  692. setFrom</H3>
  693. <PRE>
  694. public abstract void <B>setFrom</B>(<A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A>&nbsp;address)
  695.                      throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  696. <DL>
  697. <DD>Set the "From" attribute in this Message.
  698. <P>
  699. <DD><DL>
  700. </DL>
  701. </DD>
  702. <DD><DL>
  703. <DT><B>Parameters:</B><DD><CODE>address</CODE> - the sender
  704. <DT><B>Throws:</B>
  705. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE>
  706. <DD><CODE><A HREF="../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  707.                        implementation does not support modification
  708.                        of existing values
  709. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this message is
  710.                        obtained from a READ_ONLY folder.</DL>
  711. </DD>
  712. </DL>
  713. <HR>
  714.  
  715. <A NAME="addFrom(javax.mail.Address[])"><!-- --></A><H3>
  716. addFrom</H3>
  717. <PRE>
  718. public abstract void <B>addFrom</B>(<A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A>[]&nbsp;addresses)
  719.                      throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  720. <DL>
  721. <DD>Add these addresses to the existing "From" attribute
  722. <P>
  723. <DD><DL>
  724. </DL>
  725. </DD>
  726. <DD><DL>
  727. <DT><B>Parameters:</B><DD><CODE>addresses</CODE> - the senders
  728. <DT><B>Throws:</B>
  729. <DD><CODE><A HREF="../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  730.                        implementation does not support modification
  731.                        of existing values
  732. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this message is
  733.                        obtained from a READ_ONLY folder.
  734. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  735. </DD>
  736. </DL>
  737. <HR>
  738.  
  739. <A NAME="getRecipients(javax.mail.Message.RecipientType)"><!-- --></A><H3>
  740. getRecipients</H3>
  741. <PRE>
  742. public abstract <A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A>[] <B>getRecipients</B>(<A HREF="../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType</A>&nbsp;type)
  743.                                 throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  744. <DL>
  745. <DD>Get all the recipient addresses of the given type. <p>
  746.  
  747. This method returns <code>null</code> if no recipients of
  748. the given type are present in this message. It may return an
  749. empty array if the header is present, but contains no addresses.
  750. <P>
  751. <DD><DL>
  752. </DL>
  753. </DD>
  754. <DD><DL>
  755. <DT><B>Parameters:</B><DD><CODE>type</CODE> - the recipient type
  756. <DT><B>Returns:</B><DD>array of Address objects
  757. <DT><B>Throws:</B>
  758. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/Message.RecipientType.html#TO"><CODE>Message.RecipientType.TO</CODE></A>,
  759. <A HREF="../../javax/mail/Message.RecipientType.html#CC"><CODE>Message.RecipientType.CC</CODE></A>,
  760. <A HREF="../../javax/mail/Message.RecipientType.html#BCC"><CODE>Message.RecipientType.BCC</CODE></A></DL>
  761. </DD>
  762. </DL>
  763. <HR>
  764.  
  765. <A NAME="getAllRecipients()"><!-- --></A><H3>
  766. getAllRecipients</H3>
  767. <PRE>
  768. public <A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A>[] <B>getAllRecipients</B>()
  769.                           throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  770. <DL>
  771. <DD>Get all the recipient addresses for the message.
  772. The default implementation extracts the TO, CC, and BCC
  773. recipients using the <code>getRecipients</code> method. <p>
  774.  
  775. This method returns <code>null</code> if none of the recipient
  776. headers are present in this message.  It may Return an empty array
  777. if any recipient header is present, but contains no addresses.
  778. <P>
  779. <DD><DL>
  780. </DL>
  781. </DD>
  782. <DD><DL>
  783.  
  784. <DT><B>Returns:</B><DD>array of Address objects
  785. <DT><B>Throws:</B>
  786. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/Message.RecipientType.html#TO"><CODE>Message.RecipientType.TO</CODE></A>,
  787. <A HREF="../../javax/mail/Message.RecipientType.html#CC"><CODE>Message.RecipientType.CC</CODE></A>,
  788. <A HREF="../../javax/mail/Message.RecipientType.html#BCC"><CODE>Message.RecipientType.BCC</CODE></A>,
  789. <A HREF="../../javax/mail/Message.html#getRecipients(javax.mail.Message.RecipientType)"><CODE>getRecipients(javax.mail.Message.RecipientType)</CODE></A></DL>
  790. </DD>
  791. </DL>
  792. <HR>
  793.  
  794. <A NAME="setRecipients(javax.mail.Message.RecipientType, javax.mail.Address[])"><!-- --></A><H3>
  795. setRecipients</H3>
  796. <PRE>
  797. public abstract void <B>setRecipients</B>(<A HREF="../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType</A>&nbsp;type,
  798.                                   <A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A>[]&nbsp;addresses)
  799.                            throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  800. <DL>
  801. <DD>Set the recipient addresses.  All addresses of the specified
  802. type are replaced by the addresses parameter.
  803. <P>
  804. <DD><DL>
  805. </DL>
  806. </DD>
  807. <DD><DL>
  808. <DT><B>Parameters:</B><DD><CODE>type</CODE> - the recipient type<DD><CODE>addresses</CODE> - the addresses
  809. <DT><B>Throws:</B>
  810. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE>
  811. <DD><CODE><A HREF="../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  812.                        implementation does not support modification
  813.                        of existing values
  814. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this message is
  815.                        obtained from a READ_ONLY folder.</DL>
  816. </DD>
  817. </DL>
  818. <HR>
  819.  
  820. <A NAME="setRecipient(javax.mail.Message.RecipientType, javax.mail.Address)"><!-- --></A><H3>
  821. setRecipient</H3>
  822. <PRE>
  823. public void <B>setRecipient</B>(<A HREF="../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType</A>&nbsp;type,
  824.                         <A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A>&nbsp;address)
  825.                  throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  826. <DL>
  827. <DD>Set the recipient address.  All addresses of the specified
  828. type are replaced by the address parameter. <p>
  829.  
  830. The default implementation uses the <code>setRecipients</code> method.
  831. <P>
  832. <DD><DL>
  833. </DL>
  834. </DD>
  835. <DD><DL>
  836. <DT><B>Parameters:</B><DD><CODE>type</CODE> - the recipient type<DD><CODE>address</CODE> - the address
  837. <DT><B>Throws:</B>
  838. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE>
  839. <DD><CODE><A HREF="../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  840.                        implementation does not support modification
  841.                        of existing values</DL>
  842. </DD>
  843. </DL>
  844. <HR>
  845.  
  846. <A NAME="addRecipients(javax.mail.Message.RecipientType, javax.mail.Address[])"><!-- --></A><H3>
  847. addRecipients</H3>
  848. <PRE>
  849. public abstract void <B>addRecipients</B>(<A HREF="../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType</A>&nbsp;type,
  850.                                   <A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A>[]&nbsp;addresses)
  851.                            throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  852. <DL>
  853. <DD>Add these recipient addresses to the existing ones of the given type.
  854. <P>
  855. <DD><DL>
  856. </DL>
  857. </DD>
  858. <DD><DL>
  859. <DT><B>Parameters:</B><DD><CODE>type</CODE> - the recipient type<DD><CODE>addresses</CODE> - the addresses
  860. <DT><B>Throws:</B>
  861. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE>
  862. <DD><CODE><A HREF="../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  863.                        implementation does not support modification
  864.                        of existing values
  865. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this message is
  866.                        obtained from a READ_ONLY folder.</DL>
  867. </DD>
  868. </DL>
  869. <HR>
  870.  
  871. <A NAME="addRecipient(javax.mail.Message.RecipientType, javax.mail.Address)"><!-- --></A><H3>
  872. addRecipient</H3>
  873. <PRE>
  874. public void <B>addRecipient</B>(<A HREF="../../javax/mail/Message.RecipientType.html" title="class in javax.mail">Message.RecipientType</A>&nbsp;type,
  875.                         <A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A>&nbsp;address)
  876.                  throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  877. <DL>
  878. <DD>Add this recipient address to the existing ones of the given type. <p>
  879.  
  880. The default implementation uses the <code>addRecipients</code> method.
  881. <P>
  882. <DD><DL>
  883. </DL>
  884. </DD>
  885. <DD><DL>
  886. <DT><B>Parameters:</B><DD><CODE>type</CODE> - the recipient type<DD><CODE>address</CODE> - the address
  887. <DT><B>Throws:</B>
  888. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE>
  889. <DD><CODE><A HREF="../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  890.                        implementation does not support modification
  891.                        of existing values</DL>
  892. </DD>
  893. </DL>
  894. <HR>
  895.  
  896. <A NAME="getReplyTo()"><!-- --></A><H3>
  897. getReplyTo</H3>
  898. <PRE>
  899. public <A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A>[] <B>getReplyTo</B>()
  900.                     throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  901. <DL>
  902. <DD>Get the addresses to which replies should be directed.
  903. This will usually be the sender of the message, but
  904. some messages may direct replies to a different address. <p>
  905.  
  906. The default implementation simply calls the <code>getFrom</code>
  907. method. <p>
  908.  
  909. This method returns <code>null</code> if the corresponding
  910. header is not present. Returns an empty array if the header
  911. is present, but contains no addresses.
  912. <P>
  913. <DD><DL>
  914. </DL>
  915. </DD>
  916. <DD><DL>
  917.  
  918. <DT><B>Returns:</B><DD>addresses to which replies should be directed
  919. <DT><B>Throws:</B>
  920. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/Message.html#getFrom()"><CODE>getFrom()</CODE></A></DL>
  921. </DD>
  922. </DL>
  923. <HR>
  924.  
  925. <A NAME="setReplyTo(javax.mail.Address[])"><!-- --></A><H3>
  926. setReplyTo</H3>
  927. <PRE>
  928. public void <B>setReplyTo</B>(<A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address</A>[]&nbsp;addresses)
  929.                throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  930. <DL>
  931. <DD>Set the addresses to which replies should be directed.
  932. (Normally only a single address will be specified.)
  933. Not all message types allow this to be specified separately
  934. from the sender of the message. <p>
  935.  
  936. The default implementation provided here just throws the
  937. MethodNotSupportedException.
  938. <P>
  939. <DD><DL>
  940. </DL>
  941. </DD>
  942. <DD><DL>
  943. <DT><B>Parameters:</B><DD><CODE>addresses</CODE> - addresses to which replies should be directed
  944. <DT><B>Throws:</B>
  945. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE>
  946. <DD><CODE><A HREF="../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  947.                        implementation does not support modification
  948.                        of existing values
  949. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this message is
  950.                        obtained from a READ_ONLY folder.
  951. <DD><CODE><A HREF="../../javax/mail/MethodNotSupportedException.html" title="class in javax.mail">MethodNotSupportedException</A></CODE> - if the underlying
  952.                        implementation does not support setting this
  953.                        attribute</DL>
  954. </DD>
  955. </DL>
  956. <HR>
  957.  
  958. <A NAME="getSubject()"><!-- --></A><H3>
  959. getSubject</H3>
  960. <PRE>
  961. public abstract <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getSubject</B>()
  962.                           throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  963. <DL>
  964. <DD>Get the subject of this message.
  965. <P>
  966. <DD><DL>
  967. </DL>
  968. </DD>
  969. <DD><DL>
  970.  
  971. <DT><B>Returns:</B><DD>the subject
  972. <DT><B>Throws:</B>
  973. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  974. </DD>
  975. </DL>
  976. <HR>
  977.  
  978. <A NAME="setSubject(java.lang.String)"><!-- --></A><H3>
  979. setSubject</H3>
  980. <PRE>
  981. public abstract void <B>setSubject</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;subject)
  982.                         throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  983. <DL>
  984. <DD>Set the subject of this message.
  985. <P>
  986. <DD><DL>
  987. </DL>
  988. </DD>
  989. <DD><DL>
  990. <DT><B>Parameters:</B><DD><CODE>subject</CODE> - the subject
  991. <DT><B>Throws:</B>
  992. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE>
  993. <DD><CODE><A HREF="../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  994.                        implementation does not support modification
  995.                        of existing values
  996. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this message is
  997.                        obtained from a READ_ONLY folder.</DL>
  998. </DD>
  999. </DL>
  1000. <HR>
  1001.  
  1002. <A NAME="getSentDate()"><!-- --></A><H3>
  1003. getSentDate</H3>
  1004. <PRE>
  1005. public abstract <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</A> <B>getSentDate</B>()
  1006.                          throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1007. <DL>
  1008. <DD>Get the date this message was sent.
  1009. <P>
  1010. <DD><DL>
  1011. </DL>
  1012. </DD>
  1013. <DD><DL>
  1014.  
  1015. <DT><B>Returns:</B><DD>the date this message was sent
  1016. <DT><B>Throws:</B>
  1017. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1018. </DD>
  1019. </DL>
  1020. <HR>
  1021.  
  1022. <A NAME="setSentDate(java.util.Date)"><!-- --></A><H3>
  1023. setSentDate</H3>
  1024. <PRE>
  1025. public abstract void <B>setSentDate</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</A>&nbsp;date)
  1026.                          throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1027. <DL>
  1028. <DD>Set the sent date of this message.
  1029. <P>
  1030. <DD><DL>
  1031. </DL>
  1032. </DD>
  1033. <DD><DL>
  1034. <DT><B>Parameters:</B><DD><CODE>date</CODE> - the sent date of this message
  1035. <DT><B>Throws:</B>
  1036. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE>
  1037. <DD><CODE><A HREF="../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  1038.                        implementation does not support modification
  1039.                        of existing values
  1040. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this message is
  1041.                        obtained from a READ_ONLY folder.</DL>
  1042. </DD>
  1043. </DL>
  1044. <HR>
  1045.  
  1046. <A NAME="getReceivedDate()"><!-- --></A><H3>
  1047. getReceivedDate</H3>
  1048. <PRE>
  1049. public abstract <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</A> <B>getReceivedDate</B>()
  1050.                              throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1051. <DL>
  1052. <DD>Get the date this message was received.
  1053. <P>
  1054. <DD><DL>
  1055. </DL>
  1056. </DD>
  1057. <DD><DL>
  1058.  
  1059. <DT><B>Returns:</B><DD>the date this message was received
  1060. <DT><B>Throws:</B>
  1061. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1062. </DD>
  1063. </DL>
  1064. <HR>
  1065.  
  1066. <A NAME="getFlags()"><!-- --></A><H3>
  1067. getFlags</H3>
  1068. <PRE>
  1069. public abstract <A HREF="../../javax/mail/Flags.html" title="class in javax.mail">Flags</A> <B>getFlags</B>()
  1070.                        throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1071. <DL>
  1072. <DD>Returns a <code>Flags</code> object containing the flags for
  1073. this message. <p>
  1074.  
  1075. Modifying any of the flags in this returned Flags object will
  1076. not affect the flags of this message. Use <code>setFlags()</code>
  1077. to do that. <p>
  1078. <P>
  1079. <DD><DL>
  1080. </DL>
  1081. </DD>
  1082. <DD><DL>
  1083.  
  1084. <DT><B>Returns:</B><DD>Flags object containing the flags for this message
  1085. <DT><B>Throws:</B>
  1086. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/Flags.html" title="class in javax.mail"><CODE>Flags</CODE></A>,
  1087. <A HREF="../../javax/mail/Message.html#setFlags(javax.mail.Flags, boolean)"><CODE>setFlags(javax.mail.Flags, boolean)</CODE></A></DL>
  1088. </DD>
  1089. </DL>
  1090. <HR>
  1091.  
  1092. <A NAME="isSet(javax.mail.Flags.Flag)"><!-- --></A><H3>
  1093. isSet</H3>
  1094. <PRE>
  1095. public boolean <B>isSet</B>(<A HREF="../../javax/mail/Flags.Flag.html" title="class in javax.mail">Flags.Flag</A>&nbsp;flag)
  1096.              throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1097. <DL>
  1098. <DD>Check whether the flag specified in the <code>flag</code>
  1099. argument is set in this message. <p>
  1100.  
  1101. The default implementation uses <code>getFlags</code>.
  1102. <P>
  1103. <DD><DL>
  1104. </DL>
  1105. </DD>
  1106. <DD><DL>
  1107. <DT><B>Parameters:</B><DD><CODE>flag</CODE> - the flag
  1108. <DT><B>Returns:</B><DD>value of the specified flag for this message
  1109. <DT><B>Throws:</B>
  1110. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/Flags.Flag.html" title="class in javax.mail"><CODE>Flags.Flag</CODE></A>,
  1111. <A HREF="../../javax/mail/Flags.Flag.html#ANSWERED"><CODE>Flags.Flag.ANSWERED</CODE></A>,
  1112. <A HREF="../../javax/mail/Flags.Flag.html#DELETED"><CODE>Flags.Flag.DELETED</CODE></A>,
  1113. <A HREF="../../javax/mail/Flags.Flag.html#DRAFT"><CODE>Flags.Flag.DRAFT</CODE></A>,
  1114. <A HREF="../../javax/mail/Flags.Flag.html#FLAGGED"><CODE>Flags.Flag.FLAGGED</CODE></A>,
  1115. <A HREF="../../javax/mail/Flags.Flag.html#RECENT"><CODE>Flags.Flag.RECENT</CODE></A>,
  1116. <A HREF="../../javax/mail/Flags.Flag.html#SEEN"><CODE>Flags.Flag.SEEN</CODE></A></DL>
  1117. </DD>
  1118. </DL>
  1119. <HR>
  1120.  
  1121. <A NAME="setFlags(javax.mail.Flags, boolean)"><!-- --></A><H3>
  1122. setFlags</H3>
  1123. <PRE>
  1124. public abstract void <B>setFlags</B>(<A HREF="../../javax/mail/Flags.html" title="class in javax.mail">Flags</A>&nbsp;flag,
  1125.                              boolean&nbsp;set)
  1126.                       throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1127. <DL>
  1128. <DD>Set the specified flags on this message to the specified value.
  1129. Note that any flags in this message that are not specified in
  1130. the given <code>Flags</code> object are unaffected. <p>
  1131.  
  1132. This will result in a <code>MessageChangedEvent</code> being
  1133. delivered to any MessageChangedListener registered on this
  1134. Message's containing folder.
  1135. <P>
  1136. <DD><DL>
  1137. </DL>
  1138. </DD>
  1139. <DD><DL>
  1140. <DT><B>Parameters:</B><DD><CODE>flag</CODE> - Flags object containing the flags to be set<DD><CODE>set</CODE> - the value to be set
  1141. <DT><B>Throws:</B>
  1142. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE>
  1143. <DD><CODE><A HREF="../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  1144.                         implementation does not support modification
  1145.                         of existing values.
  1146. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this message is
  1147.                         obtained from a READ_ONLY folder.<DT><B>See Also:</B><DD><A HREF="../../javax/mail/event/MessageChangedEvent.html" title="class in javax.mail.event"><CODE>MessageChangedEvent</CODE></A></DL>
  1148. </DD>
  1149. </DL>
  1150. <HR>
  1151.  
  1152. <A NAME="setFlag(javax.mail.Flags.Flag, boolean)"><!-- --></A><H3>
  1153. setFlag</H3>
  1154. <PRE>
  1155. public void <B>setFlag</B>(<A HREF="../../javax/mail/Flags.Flag.html" title="class in javax.mail">Flags.Flag</A>&nbsp;flag,
  1156.                     boolean&nbsp;set)
  1157.              throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1158. <DL>
  1159. <DD>Set the specified flag on this message to the specified value.
  1160.  
  1161.  This will result in a <code>MessageChangedEvent</code> being
  1162.  delivered to any MessageChangedListener registered on this
  1163.  Message's containing folder. <p>
  1164.  
  1165. The default implementation uses the <code>setFlags</code> method.
  1166. <P>
  1167. <DD><DL>
  1168. </DL>
  1169. </DD>
  1170. <DD><DL>
  1171. <DT><B>Parameters:</B><DD><CODE>flag</CODE> - Flags.Flag object containing the flag to be set<DD><CODE>set</CODE> - the value to be set
  1172. <DT><B>Throws:</B>
  1173. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE>
  1174. <DD><CODE><A HREF="../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  1175.                        implementation does not support modification
  1176.                        of existing values.
  1177. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this message is
  1178.                        obtained from a READ_ONLY folder.<DT><B>See Also:</B><DD><A HREF="../../javax/mail/event/MessageChangedEvent.html" title="class in javax.mail.event"><CODE>MessageChangedEvent</CODE></A></DL>
  1179. </DD>
  1180. </DL>
  1181. <HR>
  1182.  
  1183. <A NAME="getMessageNumber()"><!-- --></A><H3>
  1184. getMessageNumber</H3>
  1185. <PRE>
  1186. public int <B>getMessageNumber</B>()</PRE>
  1187. <DL>
  1188. <DD>Get the Message number for this Message.
  1189. A Message object's message number is the relative
  1190.  position of this Message in its Folder. Note that the message
  1191.  number for a particular Message can change during a session
  1192.  if other messages in the Folder are deleted and expunged. <p>
  1193.  
  1194.  Valid message numbers start at 1. Messages that do not belong
  1195.  to any folder (like newly composed or derived messages) have 0
  1196.  as their message number.
  1197. <P>
  1198. <DD><DL>
  1199. </DL>
  1200. </DD>
  1201. <DD><DL>
  1202.  
  1203. <DT><B>Returns:</B><DD>the message number</DL>
  1204. </DD>
  1205. </DL>
  1206. <HR>
  1207.  
  1208. <A NAME="setMessageNumber(int)"><!-- --></A><H3>
  1209. setMessageNumber</H3>
  1210. <PRE>
  1211. protected void <B>setMessageNumber</B>(int&nbsp;msgnum)</PRE>
  1212. <DL>
  1213. <DD>Set the Message number for this Message. This method is
  1214.  invoked only by the implementation classes.
  1215. <P>
  1216. <DD><DL>
  1217. </DL>
  1218. </DD>
  1219. <DD><DL>
  1220. </DL>
  1221. </DD>
  1222. </DL>
  1223. <HR>
  1224.  
  1225. <A NAME="getFolder()"><!-- --></A><H3>
  1226. getFolder</H3>
  1227. <PRE>
  1228. public <A HREF="../../javax/mail/Folder.html" title="class in javax.mail">Folder</A> <B>getFolder</B>()</PRE>
  1229. <DL>
  1230. <DD>Get the folder from which this message was obtained. If
  1231.  this is a new message or nested message, this method returns
  1232.  null.
  1233. <P>
  1234. <DD><DL>
  1235. </DL>
  1236. </DD>
  1237. <DD><DL>
  1238.  
  1239. <DT><B>Returns:</B><DD>the containing folder</DL>
  1240. </DD>
  1241. </DL>
  1242. <HR>
  1243.  
  1244. <A NAME="isExpunged()"><!-- --></A><H3>
  1245. isExpunged</H3>
  1246. <PRE>
  1247. public boolean <B>isExpunged</B>()</PRE>
  1248. <DL>
  1249. <DD>Checks whether this message is expunged. All other methods except
  1250.  <code>getMessageNumber()</code> are invalid on an expunged
  1251.  Message object. <p>
  1252.  
  1253.  Messages that are expunged due to an explict <code>expunge()</code>
  1254.  request on the containing Folder are removed from the Folder
  1255.  immediately. Messages that are externally expunged by another source
  1256.  are marked "expunged" and return true for the isExpunged() method,
  1257.  but they are not removed from the Folder until an explicit
  1258.  <code>expunge()</code> is done on the Folder. <p>
  1259.  
  1260.  See the description of <code>expunge()</code> for more details on
  1261.  expunge handling.
  1262. <P>
  1263. <DD><DL>
  1264. </DL>
  1265. </DD>
  1266. <DD><DL>
  1267. <DT><B>See Also:</B><DD><A HREF="../../javax/mail/Folder.html#expunge()"><CODE>Folder.expunge()</CODE></A></DL>
  1268. </DD>
  1269. </DL>
  1270. <HR>
  1271.  
  1272. <A NAME="setExpunged(boolean)"><!-- --></A><H3>
  1273. setExpunged</H3>
  1274. <PRE>
  1275. protected void <B>setExpunged</B>(boolean&nbsp;expunged)</PRE>
  1276. <DL>
  1277. <DD>Sets the expunged flag for this Message. This method is to
  1278.  be used only by the implementation classes.
  1279. <P>
  1280. <DD><DL>
  1281. </DL>
  1282. </DD>
  1283. <DD><DL>
  1284. <DT><B>Parameters:</B><DD><CODE>expunged</CODE> - the expunged flag</DL>
  1285. </DD>
  1286. </DL>
  1287. <HR>
  1288.  
  1289. <A NAME="reply(boolean)"><!-- --></A><H3>
  1290. reply</H3>
  1291. <PRE>
  1292. public abstract <A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message</A> <B>reply</B>(boolean&nbsp;replyToAll)
  1293.                        throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1294. <DL>
  1295. <DD>Get a new Message suitable for a reply to this message.
  1296.  The new Message will have its attributes and headers
  1297.  set up appropriately.  Note that this new message object
  1298.  will be empty, that is, it will <strong>not</strong> have a "content".
  1299.  These will have to be suitably filled in by the client. <p>
  1300.  
  1301.  If <code>replyToAll</code> is set, the new Message will be addressed
  1302.  to all recipients of this message.  Otherwise, the reply will be
  1303.  addressed to only the sender of this message (using the value
  1304.  of the <code>getReplyTo</code> method).  <p>
  1305.  
  1306.  The "Subject" field is filled in with the original subject
  1307.  prefixed with "Re:" (unless it already starts with "Re:"). <p>
  1308.  
  1309.  The reply message will use the same session as this message.
  1310. <P>
  1311. <DD><DL>
  1312. </DL>
  1313. </DD>
  1314. <DD><DL>
  1315. <DT><B>Parameters:</B><DD><CODE>replyToAll</CODE> - reply should be sent to all recipients
  1316.                                 of this message
  1317. <DT><B>Returns:</B><DD>the reply Message
  1318. <DT><B>Throws:</B>
  1319. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE></DL>
  1320. </DD>
  1321. </DL>
  1322. <HR>
  1323.  
  1324. <A NAME="saveChanges()"><!-- --></A><H3>
  1325. saveChanges</H3>
  1326. <PRE>
  1327. public abstract void <B>saveChanges</B>()
  1328.                           throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1329. <DL>
  1330. <DD>Save any changes made to this message into the message-store
  1331.  when the containing folder is closed, if the message is contained
  1332.  in a folder.  (Some implementations may save the changes
  1333.  immediately.)  Update any header fields to be consistent with the
  1334.  changed message contents.  If any part of a message's headers or
  1335. contents are changed, saveChanges must be called to ensure that
  1336. those changes are permanent.  If saveChanges is not called, any
  1337. such modifications may or may not be saved, depending on the
  1338. message store and folder implementation. <p>
  1339.  
  1340. Messages obtained from folders opened READ_ONLY should not be
  1341. modified and saveChanges should not be called on such messages.
  1342. <P>
  1343. <DD><DL>
  1344. </DL>
  1345. </DD>
  1346. <DD><DL>
  1347.  
  1348. <DT><B>Throws:</B>
  1349. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE>
  1350. <DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this message is
  1351.                        obtained from a READ_ONLY folder.
  1352. <DD><CODE><A HREF="../../javax/mail/IllegalWriteException.html" title="class in javax.mail">IllegalWriteException</A></CODE> - if the underlying
  1353.                        implementation does not support modification
  1354.                        of existing values.</DL>
  1355. </DD>
  1356. </DL>
  1357. <HR>
  1358.  
  1359. <A NAME="match(javax.mail.search.SearchTerm)"><!-- --></A><H3>
  1360. match</H3>
  1361. <PRE>
  1362. public boolean <B>match</B>(<A HREF="../../javax/mail/search/SearchTerm.html" title="class in javax.mail.search">SearchTerm</A>&nbsp;term)
  1363.              throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE>
  1364. <DL>
  1365. <DD>Apply the specified Search criterion to this message.
  1366. <P>
  1367. <DD><DL>
  1368. </DL>
  1369. </DD>
  1370. <DD><DL>
  1371. <DT><B>Parameters:</B><DD><CODE>term</CODE> - the Search criterion
  1372. <DT><B>Returns:</B><DD>true if the Message matches this search
  1373.                        criterion, false otherwise.
  1374. <DT><B>Throws:</B>
  1375. <DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../javax/mail/search/SearchTerm.html" title="class in javax.mail.search"><CODE>SearchTerm</CODE></A></DL>
  1376. </DD>
  1377. </DL>
  1378. <!-- ========= END OF CLASS DATA ========= -->
  1379. <HR>
  1380.  
  1381.  
  1382. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  1383. <A NAME="navbar_bottom"><!-- --></A>
  1384. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  1385. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  1386. <TR>
  1387. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  1388. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  1389. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  1390.  <TR ALIGN="center" VALIGN="top">
  1391.  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  1392.  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  1393.  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  1394.  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Message.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  1395.  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  1396.  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  1397.  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  1398.  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  1399.  </TR>
  1400. </TABLE>
  1401. </TD>
  1402. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  1403. </EM>
  1404. </TD>
  1405. </TR>
  1406.  
  1407. <TR>
  1408. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  1409. &nbsp;<A HREF="../../javax/mail/IllegalWriteException.html" title="class in javax.mail"><B>PREV CLASS</B></A>&nbsp;
  1410. &nbsp;<A HREF="../../javax/mail/Message.RecipientType.html" title="class in javax.mail"><B>NEXT CLASS</B></A></FONT></TD>
  1411. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  1412.  <A HREF="../../index.html?javax/mail/Message.html" target="_top"><B>FRAMES</B></A>  &nbsp;
  1413. &nbsp;<A HREF="Message.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
  1414. &nbsp;<SCRIPT type="text/javascript">
  1415.  <!--
  1416.  if(window==top) {
  1417.    document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
  1418.  }
  1419.  //-->
  1420. </SCRIPT>
  1421. <NOSCRIPT>
  1422.  <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
  1423. </NOSCRIPT>
  1424.  
  1425.  
  1426. </FONT></TD>
  1427. </TR>
  1428. <TR>
  1429. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  1430.  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  1431. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  1432. DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  1433. </TR>
  1434. </TABLE>
  1435. <A NAME="skip-navbar_bottom"></A>
  1436. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  1437.  
  1438. <HR>
  1439. Copyright &#169; 2009 <a href="http://www.sun.com">Sun Microsystems, Inc.</a>. All Rights Reserved.
  1440. </BODY>
  1441. </HTML>
  1442.