0
如何使用帶Mailer API的play 2.0.4框架在電子郵件正文中發送帳戶驗證鏈接。下面是代碼使用play 2.0在電子郵件正文中發送URL
MailerAPI mail = play.Play.application().plugin(MailerPlugin.class).email();
mail.setSubject("Complete Your Registration");
mail.addFrom(" Live Events<[email protected]>");
mail.addRecipient(formUser.email);
String mailBody = "Please Click on the Below Link to Complete Your Registration
"localhost:9000/verifyUser?email="+ formUser.email + "&verifyCode=" + formUser.verifierCode;
mail.send(mailBody);
我檢查,我發現像這樣的文件,但其發揮1.2.3
URL url = new URL("http://www.zenexity.fr/wp-content/themes/images/logo.png");
String cid = email.embed(url, "Zenexity logo");
任何想法?
感謝
由於它的工作:) – Wearybands
更重要的是,我建議用普通模板建立HTML郵件,你需要使用它的使用即:'字符串htmlBody = views.html.mail.render(PARAMS )的ToString()' – biesior