public class MailUtil extends Object
omero.cmd.mail.SendEmailRequestI
.Modifier and Type | Field and Description |
---|---|
protected JavaMailSender |
mailSender |
protected String |
sender |
Constructor and Description |
---|
MailUtil(String sender,
JavaMailSender mailSender) |
Modifier and Type | Method and Description |
---|---|
String |
getSender()
Helper method that returns value of
omero.mail.from . |
void |
sendEmail(String to,
String topic,
String body,
boolean html,
List<String> ccrecipients,
List<String> bccrecipients)
Overloaded method which takes typical email fields as arguments, to
prepare and populate the given new MimeMessage instance and send.
|
void |
sendEmail(String from,
String to,
String topic,
String body,
boolean html,
List<String> ccrecipients,
List<String> bccrecipients)
Main method which takes typical email fields as arguments, to prepare and
populate the given new MimeMessage instance and send.
|
boolean |
validateEmail(String email)
Helper Validate that this address conforms to the syntax rules of RFC
822.
|
protected final String sender
protected final JavaMailSender mailSender
public MailUtil(String sender, JavaMailSender mailSender)
public String getSender()
omero.mail.from
.public void sendEmail(String from, String to, String topic, String body, boolean html, List<String> ccrecipients, List<String> bccrecipients)
from
- email address message is sent fromto
- email address message is sent totopic
- topic of the messagebody
- body of the messagehtml
- flag determines the content type to apply.ccrecipients
- list of email addresses message is sent as copy tobccrecipients
- list of email addresses message is sent as blind copy topublic void sendEmail(String to, String topic, String body, boolean html, List<String> ccrecipients, List<String> bccrecipients)
to
- email address message is sent totopic
- topic of the messagebody
- body of the messagehtml
- flag determines the content type to apply.ccrecipients
- list of email addresses message is sent as copy tobccrecipients
- list of email addresses message is sent as blind copy topublic boolean validateEmail(String email)
email
- email address
Version: 5.2.8-ice35-b57
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.