Class MailMessageService


  • public class MailMessageService
    extends Object
    The MessageService provides methods attach Message objects as a file to a workitem.
    Author:
    rsoika
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void attachHTMLMessage​(javax.mail.Message message, org.imixs.workflow.ItemCollection workitem)
      This method extracts a HTML representation from a MimeMessage and adds the HTML file to a given workitem.
      void attachMessage​(javax.mail.Message message, org.imixs.workflow.ItemCollection workitem)
      This method attaches a Mail Message object as a .eml file to a given workitem.
      void attachPDFMessage​(javax.mail.Message message, org.imixs.workflow.ItemCollection workitem, String gotebergServiceEndpoint)
      This method extracts a HTML representation from a MimeMessage and converts the HTML into a PDF file by using the Goteberg Sevice.
    • Constructor Detail

      • MailMessageService

        public MailMessageService()
    • Method Detail

      • attachHTMLMessage

        public void attachHTMLMessage​(javax.mail.Message message,
                                      org.imixs.workflow.ItemCollection workitem)
                               throws IOException,
                                      javax.mail.MessagingException
        This method extracts a HTML representation from a MimeMessage and adds the HTML file to a given workitem.

        The name of the attached file is _subject_.html

        Parameters:
        message -
        Throws:
        javax.mail.MessagingException
        IOException
      • attachPDFMessage

        public void attachPDFMessage​(javax.mail.Message message,
                                     org.imixs.workflow.ItemCollection workitem,
                                     String gotebergServiceEndpoint)
                              throws IOException,
                                     javax.mail.MessagingException
        This method extracts a HTML representation from a MimeMessage and converts the HTML into a PDF file by using the Goteberg Sevice. The method adds the PDF file to a given workitem.

        The name of the attached file is _subject_.html

        Parameters:
        message -
        Throws:
        javax.mail.MessagingException
        IOException
      • attachMessage

        public void attachMessage​(javax.mail.Message message,
                                  org.imixs.workflow.ItemCollection workitem)
                           throws IOException,
                                  javax.mail.MessagingException
        This method attaches a Mail Message object as a .eml file to a given workitem.

        The name of the attached file is _subject_.eml

        Parameters:
        message -
        Throws:
        javax.mail.MessagingException
        IOException