Package org.bgerp.util.mail

# Class MailMsg

java.lang.Object
org.bgerp.util.mail.MailMsg

Direct Known Subclasses:
  `MailMsg`

public class MailMsg extends Object
Email sender

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MailMsg(ConfigMap config)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `getParamMailEncoding(ConfigMap config)`
  `void`
  `send(String recipients, String subject, String txt)`
  Sends simple text message.
  `static void`
  `setAttachFileName(jakarta.mail.internet.MimeBodyPart part, String filename)`
  Set 'Content-Disposition' header with name for an attached file
  `MailMsg`
  `withAttachments(List<FileData> value)`
  Adds message attachment files

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### MailMsg

    public MailMsg(ConfigMap config)

- ## Method Details

  - ### getParamMailEncoding

    public static String getParamMailEncoding(ConfigMap config)

  - ### setAttachFileName

    public static void setAttachFileName(jakarta.mail.internet.MimeBodyPart part, String filename) throws jakarta.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:
      `jakarta.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 jakarta.mail.MessagingException
    Sends simple text message.
    Parameters:
      `recipients` - comma separated addresses.
      `subject` - subject.
      `txt` - body text.
    Throws:
      `jakarta.mail.MessagingException`