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)
    • setAttachFileName

      public static void setAttachFileName(javax.mail.internet.MimeBodyPart part, String filename) throws javax.mail.MessagingException
      Set 'Content-Disposition' header with name for an attached file
      Parameters:
      part - email part, containing the attachment
      filename - the file's name
      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