freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

javamail(編輯修改稿)

2025-08-13 15:15 本頁面
 

【文章內(nèi)容簡(jiǎn)介】 elimited list of addresses ? If strict is true, space delimited is prohibited ? AddressException indicates parsing failed (“, , false))。 Standard Accessors and Mutators ? public void setAddress(String) ? public void setPersonal(String) ? public String getPersonal() ? public String getAddress() EMail Message Classes ? : Abstract class representing an message ? : Interface implemented by Message class defining properties and content of mail messages ? : – Extends Message class and provides functionality to produce MIME messages – Most mon constructor: MimeMessage(Session session) ? Innerclass of Message ? Possible values: – TO – CC – BCC – NEWSGROUPS MimeMessage Header Methods Setting Recipients ? public void setRecipient( type, Address address) ? public void setRecipients( type, Address[] addresses) Adding Additional Recipients ? public void addRecipient( type, Address address) ? public void addrecipients( type, Address[] addresses) Getting Recipients ? public Address[] getRecipients( type) ? public Address[] getAllRecipients() Setting From Header ? public void setFrom() Sets from to default from property specified in Session properties ? public void setFrom(Address address) ? Public void addFrom(Address[] addresses) Adds one or more addresses to those already listed in the from header Getting From Header public Address[] getFrom() ReplyTo Header ? public void setReplyTo(Address[] addresses) ? public Address[] getReplyTo() Note that several methods use arrays of Addresses Subject Header ? public void setSubject(String subject) ? public String getSubject() Sent Date Header ? public void setSentDate(Date date) ? public Date getSentDate() Content of a SinglePart Message ? public void setText(String text) Defaults to ASCII ? public void setText(String text, String charset) Used for nonASCII messages or to improve performance if there is a lot of text Note About Examples As always, you are encouraged to experiment with the examples that are provided. However, you must make sure that you use your own address in the from, replyto, and to headers so as not to “spam” anyone. Example 1: Sends an message from one person to another import .*。 import 。 import 。 import 。 import .*。 import .*。 Email address class Properties class Directory containing abstract mail classes Inter classes createSession() public Session createSession() { Properties p = ()。 (, smtp)。 (,)。 Gets the default system properties Sets the transport protocol to SMTP and sets the appropriate SMTP host for CMU (,imap)。 (,)。 Session sess = (p)。 return sess。 } Instantiates a session using the new properties object Sets the store protocol to IMAP and sets the appropriate SMTP host for CMU (not really needed unless the application will read ) createMessage() public Message createMessage(Session sess) throws MessagingException{ Message mess = new MimeMessage(sess)。 Base exception class for Inter mail Default Constructor for a MimeMessage (new InterAddress())。 (, (, false))。 (Test)。 (This is a test of JavaMail39。s functionality.)。 (new Date())。 return mess。 } setRecipients(MessageRecipientType type, String address) main() public static void main(String[] args) { MessageSend send = new MessageSend()。 Session sess = ()。 try { Message mess = (sess
點(diǎn)擊復(fù)制文檔內(nèi)容
黨政相關(guān)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1