Class TextMailMessage

  • All Implemented Interfaces:
    IMailMessage

    public class TextMailMessage
    extends MailMessage
    This class can be used to create an plain text email message that can be send via a IMailConnection.
    Since:
    6.4
    Author:
    Jon van Leuven
    • Constructor Detail

      • TextMailMessage

        public TextMailMessage​(IMailAddress sender,
                               IMailAddress recipient,
                               String subject,
                               String body)
        Create a basic plain text email message with a sender, one recipient, a subject and a body.
        Parameters:
        sender - The sender, may not be null
        recipient - The recipient, may not be null
        subject - The subject, may be null
        body - The body of the message, may be null
      • TextMailMessage

        public TextMailMessage​(IMailAddress sender,
                               IMailAddress[] recipients,
                               IMailAddress[] carbonCopyRecipients,
                               IMailAddress[] blindCarbonCopyRecipients,
                               IMailMessageAttachment[] attachments,
                               String subject,
                               String body)
        Create a fully specified plain text email message. Note: the message should contain at least one recipient (to/cc/bcc)
        Parameters:
        sender - The sender, may not be null
        recipients - The recipients, may be null
        carbonCopyRecipients - The cc recipients, may be null
        blindCarbonCopyRecipients - The bcc recipients, may be null
        attachments - The mail message attachments, may be null
        subject - The subject, may be null
        body - The body of the message, may be null
    • Method Detail

      • getContentType

        public String getContentType()
        Description copied from interface: IMailMessage
        This method returns the Content-Type header for the specific type of message.