我正在开发一款使用Google应用引擎作为后端的Android应用。 我被困在一个点,我想在第一次登录应用程序时向我的用户发送欢迎电子邮件。
我搜索了很多但没有得到适当的参考。我遵循了这份官方文件https://cloud.google.com/appengine/docs/java/mail/#Java_Sending_mail_with_the_JavaMail_API,但没有得到结果。
任何人都可以帮助我解决这个问题。
答案 0 :(得分:0)
我已经使用了你发布的链接和Sendgrid方法,它们都适合我。 ' Sendgrid可能更容易实施。
// set credentials
Sendgrid mail = new Sendgrid("<sendgrid_username>","<sendgrid_password>");
// set email data
mail.setTo("foo@bar.com").setFrom("me@bar.com").setSubject("Subject goes here").setText("Hello World!").setHtml("<strong>Hello World!</strong>");
// send your message
mail.send();
您使用其他方法遇到的确切问题是什么?