Class SimpleMailParser

java.lang.Object
de.uplanet.lucy.server.mail.SimpleMailParser

@Scriptable public final class SimpleMailParser extends Object
Simple mail parser to simplify the parsing of the most common cases of multipart mails.
  • Method Details

    • newInstance

      public static final SimpleMailParser 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 is null.