Class ComposeMessage


  • public class ComposeMessage
    extends java.lang.Object
    • Constructor Detail

      • ComposeMessage

        public ComposeMessage​(SmtpWrapper smtpProtocol,
                              javax.mail.Session session)
    • Method Detail

      • withRecipients

        public ComposeMessage withRecipients​(java.lang.String commaSeparatedRecipients)
                                      throws java.lang.Exception
        commaSeparatedRecipients = "a1@test.com, a2@test.com")
        Parameters:
        commaSeparatedRecipients -
        Returns:
        Throws:
        java.lang.Exception
      • withSubject

        public ComposeMessage withSubject​(java.lang.String subject)
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • withBody

        public ComposeMessage withBody​(java.lang.String body)
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • withAttachments

        public ComposeMessage withAttachments​(java.io.File... files)
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • sendMail

        public SmtpWrapper sendMail()
                             throws java.lang.Exception
        Throws:
        java.lang.Exception