Package de.uplanet.lucy.server.mail
Class SimpleMailParser
java.lang.Object
de.uplanet.lucy.server.mail.SimpleMailParser
Simple mail parser to simplify the parsing of the most common cases of multipart mails.
-
Method Summary
Modifier and TypeMethodDescriptionstatic final SimpleMailParser
Create a new instance.de.uplanet.lucy.server.mail.ParsedMessage
parseMessage
(javax.mail.Message p_message, Path p_dirAttachment) Parse a message and extract useful information as for instance the subject, from- and to-address(es), attachments...
-
Method Details
-
newInstance
Create a new instance.- Returns:
- A new instance.
-
parseMessage
public de.uplanet.lucy.server.mail.ParsedMessage parseMessage(javax.mail.Message p_message, Path p_dirAttachment) throws javax.mail.MessagingException, IOException Parse a message and extract useful information as for instance the subject, from- and to-address(es), attachments...- Parameters:
p_message
- The message to parse.p_dirAttachment
- The directory in which to store the extracted attachments.- Returns:
- A parsed message with detailed information.
- Throws:
javax.mail.MessagingException
- If any failure occurs.IOException
- If an I/O error occurred.IllegalArgumentException
- If either the message or the attachment directory parameter isnull
.
-