Package com.feth.play.module.mail

Examples of com.feth.play.module.mail.Mailer.sendMail()


            );
            final Mailer defaultMailer = Mailer.getDefaultMailer();

            {
                // simple usage
                defaultMailer.sendMail("play-easymail | it works!", body, email);
            }

            {
                // advanced usage
                final Mailer.Mail customMail = new Mailer.Mail("play-easymail | advanced", body, new String[]{ email });
View Full Code Here


                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());
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.