Class MailMsg

java.lang.Object
org.bgerp.util.mail.MailMsg
Direct Known Subclasses:
MailMsg

public class MailMsg extends Object
E-Mail sender
  • Constructor Details

  • Method Details

    • getParamMailEncoding

      public static String getParamMailEncoding(ConfigMap config)
    • setAttachContentTypeHeader

      public static void setAttachContentTypeHeader(javax.mail.internet.MimeBodyPart part) throws javax.mail.MessagingException
      Throws:
      javax.mail.MessagingException
    • setAttachFileName

      public static void setAttachFileName(javax.mail.internet.MimeBodyPart part, String value, String encoding) throws javax.mail.MessagingException
      Throws:
      javax.mail.MessagingException
    • withAttachments

      public MailMsg withAttachments(List<FileData> value)
      Adds message attachment files
      Parameters:
      value - the attachments
      Returns:
    • send

      public void send(String recipients, String subject, String txt) throws javax.mail.MessagingException
      Sends simple text message.
      Parameters:
      recipients - comma separated addresses.
      subject - subject.
      txt - body text.
      Throws:
      javax.mail.MessagingException