/** * Prepares an email object including the default recipients. * * @param recipients * recipient to send to. * @return Returns a prepared {@link HtmlEmail} object. * @throws EmailException * is thrown when the from address could not be set */ private HtmlEmail prepareHtmlEmail(List<String> recipients) throws EmailException { return prepareHtmlEmail(recipients, true); }
HtmlEmail email = prepareHtmlEmail(recipients); email.setSubject(subject); email.setHtmlMsg(htmlMessage);
HtmlEmail htmlEmail = prepareHtmlEmail(Collections.singletonList(testMailRecipient), false); htmlEmail.setSubject("inspectIT Test E-Mail"); htmlEmail.setTextMsg("Hello, this is a test e-mail. You have successfully configured the SMTP server used by inspectIT!");