Package com.netlang.mail
Class MailMessage
java.lang.Object
com.netlang.mail.MailMessage
The
MailMessage class-
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()Delete mailbooleanCheck if any attachment existsbooleanexistAttachment(String name) Check if attachment existsGet all attachmentsgetBCC()Get fromgetCC()Get fromgetFrom()Get fromGet internal contentjavax.mail.MessageReturn the internal messageReturn the messagegetMessage(javax.mail.internet.MimeMultipart part) Get the messagecom.intellus.util.IDateReturn the received datecom.intellus.util.IDateReturn the send dateReturn the subjectgetTo()Get frombooleanGet all attachmentsbooleanReturn true if the mail has the user flag setbooleanReturn true if the mail is answeredbooleanReturn true if the mail is deletedbooleanisRecent()Return true if the mail is recentbooleanisUnread()Return true if the mail is unreadvoidmarkRead()Mark the mail as readvoidMark the mail as readvoidmove(MailFolder f) voidsaveAttachment(NetlangFile file, String name) voidsaveAttachment(com.netlang.session.NetlangSession session, String resourceid, String filepath, String name) voidsaveAttachment(File file, String name) voidsaveAttachment(String path, String name, String saveToFilename) Save attachmentvoidsaveAttachments(NetlangFile file) voidsaveAttachments(com.netlang.session.NetlangSession session, String resourceid, String filepath) voidsaveAttachments(File file) voidsaveAttachments(String path) Save attachmentvoidsaveAttachments(String resourceid, String filepath) voidsaveOctetAttachment(String path, String prefix, String extension) Save attachmentvoidsaveOctetAttachment(String path, String prefix, String extension, javax.mail.BodyPart body) Save attachmentvoidsetUserFlag(boolean value) Set the user flag
-
Method Details
-
delete
public void delete() throws javax.mail.MessagingExceptionDelete mail- Throws:
javax.mail.MessagingException
-
existAnyAttachment
public boolean existAnyAttachment() throws com.net4z.APIExceptionCheck if any attachment exists- Throws:
com.net4z.APIException
-
existAttachment
Check if attachment exists- Parameters:
name-- Returns:
- Throws:
com.net4z.APIException
-
getAttachmentNames
Get all attachments- Returns:
- Throws:
com.net4z.APIException
-
getTo
Get from- Returns:
- Throws:
com.net4z.APIException
-
getCC
Get from- Returns:
- Throws:
com.net4z.APIException
-
getBCC
Get from- Returns:
- Throws:
com.net4z.APIException
-
getFrom
Get from- Returns:
- Throws:
com.net4z.APIException
-
getInternalContent
Get internal content- Returns:
- Throws:
com.net4z.APIException
-
getInternalMessage
public javax.mail.Message getInternalMessage()Return the internal message- Returns:
-
getMessage
Return the message- Returns:
- Throws:
com.net4z.APIException
-
getMessage
Get the message- Parameters:
part-- Returns:
- Throws:
com.net4z.APIException
-
getReceivedDate
public com.intellus.util.IDate getReceivedDate() throws com.net4z.APIExceptionReturn the received date- Returns:
- Throws:
com.net4z.APIException
-
getSentDate
public com.intellus.util.IDate getSentDate() throws com.net4z.APIExceptionReturn the send date- Returns:
- Throws:
com.net4z.APIException
-
getSubject
Return the subject- Returns:
- Throws:
com.net4z.APIException
-
isAnswered
Return true if the mail is answered- Throws:
Exception
-
isUnread
Return true if the mail is unread- Throws:
Exception
-
markRead
Mark the mail as read- Throws:
Exception
-
markUnread
Mark the mail as read- Throws:
Exception
-
isDeleted
Return true if the mail is deleted- Throws:
Exception
-
isRecent
Return true if the mail is recent- Throws:
Exception
-
hasUserFlag
Return true if the mail has the user flag set- Throws:
Exception
-
setUserFlag
Set the user flag- Throws:
Exception
-
saveAttachment
- Throws:
com.net4z.APIException
-
saveAttachment
- Throws:
com.net4z.APIException
-
saveAttachment
public void saveAttachment(com.netlang.session.NetlangSession session, String resourceid, String filepath, String name) throws com.net4z.APIException - Throws:
com.net4z.APIException
-
saveAttachment
public void saveAttachment(String path, String name, String saveToFilename) throws com.net4z.APIException Save attachment- Parameters:
path-name-- Throws:
com.net4z.APIException
-
saveAttachments
- Throws:
com.net4z.APIException
-
saveAttachments
- Throws:
com.net4z.APIException
-
saveAttachments
- Throws:
com.net4z.APIException
-
saveAttachments
public void saveAttachments(com.netlang.session.NetlangSession session, String resourceid, String filepath) throws com.net4z.APIException - Throws:
com.net4z.APIException
-
hasOctetStreams
public boolean hasOctetStreams() throws com.intellus.base.BCCExceptionGet all attachments- Returns:
- Throws:
com.intellus.base.BCCException
-
saveOctetAttachment
public void saveOctetAttachment(String path, String prefix, String extension) throws com.intellus.base.BCCException Save attachment- Parameters:
path-name-- Throws:
com.intellus.base.BCCException
-
saveOctetAttachment
public void saveOctetAttachment(String path, String prefix, String extension, javax.mail.BodyPart body) throws com.intellus.base.BCCException Save attachment- Parameters:
path-name-- Throws:
com.intellus.base.BCCException
-
saveAttachments
Save attachment- Parameters:
path-- Throws:
com.net4z.APIException
-
getFolder
-
move
- Throws:
com.net4z.APIException
-