⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 message.html

📁 SUN的JAVA MAIL API
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="getFrom()"><!-- --></A><H3>
getFrom</H3>
<PRE>
public abstract <A HREF="../../javax/mail/Address.html">Address</A>[] <B>getFrom</B>()
                           throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Returns the "From" attribute. The "From" attribute contains
 the identity of the person(s) who wished this message to 
 be sent. <p>
 
 In certain implementations, this may be different
 from the entity that actually sent the message. <p>

 This method returns <code>null</code> if this attribute
 is not present in this message. Returns an empty array if
 this attribute is present, but contains no addresses.<DD><DL>
<DT><B>Returns:</B><DD>array of Address objects<DT><B>Throws:</B><DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - &nbsp;</DL>
</DD>
</DL>
<HR>

<A NAME="setFrom()"><!-- --></A><H3>
setFrom</H3>
<PRE>
public abstract void <B>setFrom</B>()
                      throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Set the "From" attribute in this Message. The value of this
 attribute is obtained from the property "mail.user". If this
 property is absent, the system property "user.name" is used.<DD><DL>
<DT><B>Throws:</B><DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - &nbsp;<DD><A HREF="../../javax/mail/IllegalWriteException.html">IllegalWriteException</A> - if the underlying 
			implementation does not support modification 
			of existing values<DD>IllegalStateException - if this message is
			obtained from a READ_ONLY folder.</DL>
</DD>
</DL>
<HR>

<A NAME="setFrom(javax.mail.Address)"><!-- --></A><H3>
setFrom</H3>
<PRE>
public abstract void <B>setFrom</B>(<A HREF="../../javax/mail/Address.html">Address</A>&nbsp;address)
                      throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Set the "From" attribute in this Message.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>address</CODE> - the sender<DT><B>Throws:</B><DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - &nbsp;<DD><A HREF="../../javax/mail/IllegalWriteException.html">IllegalWriteException</A> - if the underlying 
			implementation does not support modification 
			of existing values<DD>IllegalStateException - if this message is
			obtained from a READ_ONLY folder.</DL>
</DD>
</DL>
<HR>

<A NAME="addFrom(javax.mail.Address[])"><!-- --></A><H3>
addFrom</H3>
<PRE>
public abstract void <B>addFrom</B>(<A HREF="../../javax/mail/Address.html">Address</A>[]&nbsp;addresses)
                      throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Add these addresses to the existing "From" attribute<DD><DL>
<DT><B>Parameters:</B><DD><CODE>address</CODE> - the sender<DT><B>Throws:</B><DD><A HREF="../../javax/mail/IllegalWriteException.html">IllegalWriteException</A> - if the underlying 
			implementation does not support modification 
			of existing values<DD>IllegalStateException - if this message is
			obtained from a READ_ONLY folder.<DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - &nbsp;</DL>
</DD>
</DL>
<HR>

<A NAME="getRecipients(javax.mail.Message.RecipientType)"><!-- --></A><H3>
getRecipients</H3>
<PRE>
public abstract <A HREF="../../javax/mail/Address.html">Address</A>[] <B>getRecipients</B>(<A HREF="../../javax/mail/Message.RecipientType.html">Message.RecipientType</A>&nbsp;type)
                                 throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Get all the recipient addresses of the given type. <p>

 This method returns <code>null</code> if the header for
 the given type is not present in this message. Returns an 
 empty array if the header is present, but contains no addresses.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - the recipient type<DT><B>Returns:</B><DD>array of Address objects<DT><B>Throws:</B><DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - &nbsp;<DT><B>See Also: </B><DD><A HREF="../../javax/mail/Message.RecipientType.html#TO"><CODE>Message.RecipientType.TO</CODE></A>, 
<A HREF="../../javax/mail/Message.RecipientType.html#CC"><CODE>Message.RecipientType.CC</CODE></A>, 
<A HREF="../../javax/mail/Message.RecipientType.html#BCC"><CODE>Message.RecipientType.BCC</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getAllRecipients()"><!-- --></A><H3>
getAllRecipients</H3>
<PRE>
public <A HREF="../../javax/mail/Address.html">Address</A>[] <B>getAllRecipients</B>()
                           throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Get all the recipient addresses for the message.
 The default implementation extracts the TO, CC, and BCC
 recipients using the <code>getRecipients</code> method.<DD><DL>
<DT><B>Returns:</B><DD>array of Address objects<DT><B>Throws:</B><DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - &nbsp;<DT><B>See Also: </B><DD><A HREF="../../javax/mail/Message.RecipientType.html#TO"><CODE>Message.RecipientType.TO</CODE></A>, 
<A HREF="../../javax/mail/Message.RecipientType.html#CC"><CODE>Message.RecipientType.CC</CODE></A>, 
<A HREF="../../javax/mail/Message.RecipientType.html#BCC"><CODE>Message.RecipientType.BCC</CODE></A>, 
<A HREF="../../javax/mail/Message.html#getRecipients(javax.mail.Message.RecipientType)"><CODE>getRecipients(javax.mail.Message.RecipientType)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setRecipients(javax.mail.Message.RecipientType, javax.mail.Address[])"><!-- --></A><H3>
setRecipients</H3>
<PRE>
public abstract void <B>setRecipients</B>(<A HREF="../../javax/mail/Message.RecipientType.html">Message.RecipientType</A>&nbsp;type,
                                   <A HREF="../../javax/mail/Address.html">Address</A>[]&nbsp;addresses)
                            throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Set the recipient addresses.  All addresses of the specified
 type are replaced by the addresses parameter.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - the recipient type<DD><CODE>addresses</CODE> - the addresses<DT><B>Throws:</B><DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - &nbsp;<DD><A HREF="../../javax/mail/IllegalWriteException.html">IllegalWriteException</A> - if the underlying 
			implementation does not support modification 
			of existing values<DD>IllegalStateException - if this message is
			obtained from a READ_ONLY folder.</DL>
</DD>
</DL>
<HR>

<A NAME="setRecipient(javax.mail.Message.RecipientType, javax.mail.Address)"><!-- --></A><H3>
setRecipient</H3>
<PRE>
public void <B>setRecipient</B>(<A HREF="../../javax/mail/Message.RecipientType.html">Message.RecipientType</A>&nbsp;type,
                         <A HREF="../../javax/mail/Address.html">Address</A>&nbsp;address)
                  throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Set the recipient address.  All addresses of the specified
 type are replaced by the address parameter. <p>

 The default implementation uses the <code>setRecipients</code> method.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - the recipient type<DD><CODE>address</CODE> - the address<DT><B>Throws:</B><DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - &nbsp;<DD><A HREF="../../javax/mail/IllegalWriteException.html">IllegalWriteException</A> - if the underlying 
			implementation does not support modification 
			of existing values</DL>
</DD>
</DL>
<HR>

<A NAME="addRecipients(javax.mail.Message.RecipientType, javax.mail.Address[])"><!-- --></A><H3>
addRecipients</H3>
<PRE>
public abstract void <B>addRecipients</B>(<A HREF="../../javax/mail/Message.RecipientType.html">Message.RecipientType</A>&nbsp;type,
                                   <A HREF="../../javax/mail/Address.html">Address</A>[]&nbsp;addresses)
                            throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Add these recipient addresses to the existing ones of the given type.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - the recipient type<DD><CODE>addresses</CODE> - the addresses<DT><B>Throws:</B><DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - &nbsp;<DD><A HREF="../../javax/mail/IllegalWriteException.html">IllegalWriteException</A> - if the underlying 
			implementation does not support modification 
			of existing values<DD>IllegalStateException - if this message is
			obtained from a READ_ONLY folder.</DL>
</DD>
</DL>
<HR>

<A NAME="addRecipient(javax.mail.Message.RecipientType, javax.mail.Address)"><!-- --></A><H3>
addRecipient</H3>
<PRE>
public void <B>addRecipient</B>(<A HREF="../../javax/mail/Message.RecipientType.html">Message.RecipientType</A>&nbsp;type,
                         <A HREF="../../javax/mail/Address.html">Address</A>&nbsp;address)
                  throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Add this recipient address to the existing ones of the given type. <p>

 The default implementation uses the <code>addRecipients</code> method.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - the recipient type<DD><CODE>address</CODE> - the address<DT><B>Throws:</B><DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - &nbsp;<DD><A HREF="../../javax/mail/IllegalWriteException.html">IllegalWriteException</A> - if the underlying 
			implementation does not support modification 
			of existing values</DL>
</DD>
</DL>
<HR>

<A NAME="getReplyTo()"><!-- --></A><H3>
getReplyTo</H3>
<PRE>
public <A HREF="../../javax/mail/Address.html">Address</A>[] <B>getReplyTo</B>()
                     throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Get the addresses to which replies should be directed.
 This will usually be the sender of the message, but
 some messages may direct replies to a different address. <p>

 The default implementation simply calls the <code>getFrom</code>
 method. <p>

 This method returns <code>null</code> if the corresponding
 header is not present. Returns an empty array if the header
 is present, but contains no addresses.<DD><DL>
<DT><B>Returns:</B><DD>addresses to which replies should be directed<DT><B>Throws:</B><DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - &nbsp;<DT><B>See Also: </B><DD><A HREF="../../javax/mail/Message.html#getFrom()"><CODE>getFrom()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setReplyTo(javax.mail.Address[])"><!-- --></A><H3>
setReplyTo</H3>
<PRE>
public void <B>setReplyTo</B>(<A HREF="../../javax/mail/Address.html">Address</A>[]&nbsp;addresses)
                throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Set the addresses to which replies should be directed.
 (Normally only a single address will be specified.)
 Not all message types allow this to be specified separately
 from the sender of the message. <p>

 The default implementation provided here just throws the
 MethodNotSupportedException.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>addresses</CODE> - addresses to which replies should be directed<DT><B>Throws:</B><DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - &nbsp;<DD><A HREF="../../javax/mail/IllegalWriteException.html">IllegalWriteException</A> - if the underlying 
			implementation does not support modification 
			of existing values<DD>IllegalStateException - if this message is
			obtained from a READ_ONLY folder.<DD><A HREF="../../javax/mail/MethodNotSupportedException.html">MethodNotSupportedException</A> - if the underlying 
			implementation does not support setting this
			attribute</DL>
</DD>
</DL>
<HR>

<A NAME="getSubject()"><!-- --></A><H3>
getSubject</H3>
<PRE>
public abstract java.lang.String <B>getSubject</B>()
                                     throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Get the subject of this message.<DD><DL>
<DT><B>Returns:</B><DD>the subject<DT><B>Throws:</B><DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - &nbsp;</DL>
</DD>
</DL>
<HR>

<A NAME="setSubject(java.lang.String)"><!-- --></A><H3>
setSubject</H3>
<PRE>
public abstract void <B>setSubject</B>(java.lang.String&nbsp;subject)
                         throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Set the subject of this message.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>subject</CODE> - the subject<DT><B>Throws:</B><DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - &nbsp;<DD><A HREF="../../javax/mail/IllegalWriteException.html">IllegalWriteException</A> - if the underlying 
			implementation does not support modification 
			of existing values<DD>IllegalStateException - if this message is
			obtained from a READ_ONLY folder.</DL>
</DD>
</DL>
<HR>

<A NAME="getSentDate()"><!-- --></A><H3>
getSentDate</H3>
<PRE>
public abstract java.util.Date <B>getSentDate</B>()
                                    throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Get the date this message was sent.<DD><DL>
<DT><B>Returns:</B><DD>the date this message was sent<DT><B>Throws:</B><DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - &nbsp;</DL>
</DD>
</DL>
<HR>

<A NAME="setSentDate(java.util.Date)"><!-- --></A><H3>
setSentDate</H3>
<PRE>
public abstract void <B>setSentDate</B>(java.util.Date&nbsp;date)
                          throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Set the sent date of this message.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>date</CODE> - the sent date of this message<DT><B>Throws:</B><DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - &nbsp;<DD><A HREF="../../javax/mail/IllegalWriteException.html">IllegalWriteException</A> - if the underlying 
			implementation does not support modification 
			of existing values<DD>IllegalStateException - if this message is
			obtained from a READ_ONLY folder.</DL>
</DD>
</DL>
<HR>

<A NAME="getReceivedDate()"><!-- --></A><H3>
getReceivedDate</H3>
<PRE>
public abstract java.util.Date <B>getReceivedDate</B>()
                                        throws <A HREF="../../javax/mail/MessagingException.html">MessagingException</A></PRE>
<DL>
<DD>Get the date this message was received.<DD><DL>
<DT><B>Returns:</B><DD>the date this message was received<DT><B>Throws:</B><DD><A HREF="../../javax/mail/MessagingException.html">MessagingException</A> - &nbsp;</DL>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -