.getString("mail.smtp.from");
if (email.getFromAddress() == null && !StringUtils.isEmpty(from)) {
email.setFrom(from);
} else if (email.getFromAddress() == null) {
throw new MailException("Please define a 'from' email address",
new NullPointerException());
}
if ((email.getToAddresses() == null || email.getToAddresses().size() == 0)
&& (email.getCcAddresses() == null || email.getCcAddresses()
.size() == 0)
&& (email.getBccAddresses() == null || email.getBccAddresses()
.size() == 0)) {
throw new MailException("Please define a recipient email address",
new NullPointerException());
}
if (email.getSubject() == null) {
throw new MailException("Please define a subject",
new NullPointerException());
}
if (email.getReplyToAddresses() == null
|| email.getReplyToAddresses().size() == 0) {
email.addReplyTo(email.getFromAddress().getAddress());