[Domino] Java access to Domino Email code snippets [2]
|
Prepared
|
Date
|
Keywords
|
|
Zheng @ ultrapower
|
2005-6-21
|
Java Domino
|
Reply to an email in the user's inbox
Two knowledge points:
1: You need to use noteID to locate the email:
Database dbMail = sNotes. getDatabase (sNotes. getServerName (),
Mailfile, false );
Document doc = dbMail. getDocumentByID (noteid );
2: Create a reply email using the createReplyMessage method of the Document.
|
Code snippet:
|
|
Database dbMail = sNotes. getDatabase (sNotes. getServerName (),
Mailfile, false );
Document doc = dbMail. getDocumentByID (noteid );
If (doc! = Null)
{
/* Parameters of createReplyMessage
* Boolean toall
If true, the new document recipient list contains all
Recipients of the original. If false, the new document
Recipient list contains only the sender of the original.
*/
Document reply = doc. createReplyMessage (false );
Item itemSubject = doc. getFirstItem ("Subject"); String strItemRe = "reply:" + itemSubject. getText (); reply. replaceItemValue ("Subject", strItemRe );
Reply. replaceItemValue ("Body ",
Body );
Reply. send (doc. getItemValueString ("From "));
}
|
.
|
Prepared
|
Date
|
Keywords
|
|
Zheng @ ultrapower
|
2005-6-21
|
Java Domino
|