public class MailUtil
extends java.lang.Object
omero.cmd.mail.SendEmailRequestI
.Modifier and Type | Field and Description |
---|---|
protected org.springframework.mail.javamail.JavaMailSender |
mailSender |
protected java.lang.String |
sender |
Constructor and Description |
---|
MailUtil(java.lang.String sender,
org.springframework.mail.javamail.JavaMailSender mailSender) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getSender()
Helper method that returns value of
omero.mail.from . |
void |
sendEmail(java.lang.String to,
java.lang.String topic,
java.lang.String body,
boolean html,
java.util.List<java.lang.String> ccrecipients,
java.util.List<java.lang.String> bccrecipients)
Overloaded method which takes typical email fields as arguments, to
prepare and populate the given new MimeMessage instance and send.
|
void |
sendEmail(java.lang.String from,
java.lang.String to,
java.lang.String topic,
java.lang.String body,
boolean html,
java.util.List<java.lang.String> ccrecipients,
java.util.List<java.lang.String> bccrecipients)
Main method which takes typical email fields as arguments, to prepare and
populate the given new MimeMessage instance and send.
|
boolean |
validateEmail(java.lang.String email)
Helper Validate that this address conforms to the syntax rules of RFC
822.
|
protected final java.lang.String sender
protected final org.springframework.mail.javamail.JavaMailSender mailSender
public MailUtil(java.lang.String sender, org.springframework.mail.javamail.JavaMailSender mailSender)
public java.lang.String getSender()
omero.mail.from
.public void sendEmail(java.lang.String from, java.lang.String to, java.lang.String topic, java.lang.String body, boolean html, java.util.List<java.lang.String> ccrecipients, java.util.List<java.lang.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(java.lang.String to, java.lang.String topic, java.lang.String body, boolean html, java.util.List<java.lang.String> ccrecipients, java.util.List<java.lang.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(java.lang.String email)
email
- email address
Version: 5.4.6-ice35-b87
Copyright © 2018 The University of Dundee & Open Microscopy Environment. All Rights Reserved.