Class SendMailHelper.MailSender

    • Constructor Detail

      • MailSender

        public MailSender​(org.slf4j.Logger logger,
                          String subject,
                          String htmlBody,
                          String textBody,
                          Collection<File> attachments,
                          List<String> recipients,
                          String sender,
                          List<String> cc,
                          List<String> bcc,
                          boolean deliveryReceipt,
                          boolean readReceipt,
                          String host,
                          long port,
                          String securityProtocol,
                          String user,
                          String password,
                          boolean singleEmail)
        Initialize the mail sender with email parameters
        Parameters:
        logger - The logger
        subject - The mail subject
        htmlBody - The HTML mail body. Can be null.
        textBody - The text mail body. Can be null.
        attachments - the file attachments. Can be null.
        recipients - The recipients addresses
        sender - The sender address. Can be null when called by MailChecker.
        cc - Carbon copy address list. Can be null.
        bcc - Blind carbon copy address list. Can be null.
        deliveryReceipt - true to request that the receiving mail server send a notification when the mail is received.
        readReceipt - true to request that the receiving mail client send a notification when the person opens the mail.
        host - The server mail host. Can be null when called by MailChecker.
        securityProtocol - the security protocol to use when transporting the email
        port - The server port
        user - The user name
        password - The user password
        singleEmail - true if just one email is sent with all recipients. Otherwise, an email will be sent for each recipients.
    • Method Detail

      • _sendMail

        private void _sendMail​(javax.mail.internet.MimeMessage message,
                               javax.mail.Transport tr)
                        throws javax.mail.MessagingException
        Throws:
        javax.mail.MessagingException