Package org.bgerp.util.mail
Class MailMsg
java.lang.Object
org.bgerp.util.mail.MailMsg
- Direct Known Subclasses:
MailMsg
E-Mail sender
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getParamMailEncoding
(ConfigMap config) void
Sends simple text message.static void
setAttachFileName
(javax.mail.internet.MimeBodyPart part, String filename) Set 'Content-Disposition' header with name for an attached filewithAttachments
(List<FileData> value) Adds message attachment files
-
Constructor Details
-
MailMsg
-
-
Method Details
-
getParamMailEncoding
-
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 attachmentfilename
- the file's name- Throws:
javax.mail.MessagingException
-
withAttachments
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
-