{
// advanced usage
final Mailer.Mail customMail = new Mailer.Mail("play-easymail | advanced", body, new String[]{ email });
customMail.addCustomHeader("Reply-To", email);
customMail.addAttachment(new Attachment("attachment.pdf", Play.application().getFile("conf/sample.pdf")));
byte[] data = "data".getBytes();
customMail.addAttachment(new Attachment("data.txt", data, "text/plain", "A simple file", EmailAttachment.INLINE));
defaultMailer.sendMail(customMail);
}
flash("message", "2 mails to '" + email + "' have been sent successfully!");
return redirect(routes.Application.index());