在 Playframework 2.0 中发送电子邮件 [英] Sending Emails in Playframework 2.0

查看:34
本文介绍了在 Playframework 2.0 中发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Playframework 2.0 中,发送电子邮件似乎并不那么简单(请参阅 在 Play 框架中使用 sendmail 作为 SMTP 服务器),就像在 Play 1.x 中一样.没有开箱即用的邮件程序功能……那么,我该如何发送电子邮件?

In Playframework 2.0, it does not appear to be as simple to send emails (see comments on Using sendmail as SMTP server in Play Framework) as it did in Play 1.x. There is no out of the box mailer functionality... so, how do I send emails?

推荐答案

Playframework 2.x 需要一个插件才能使用 Mail.它没有被添加到核心中,因为开发人员觉得让电子邮件工作很简单,所以决定创建一个插件更好.然而,谷歌群组上的快速消息表明他们弄错了......人们期望与 Play 1.x 相同的功能.

Playframework 2.x requires a plugin for Mail to work. It was not added to the core because developers felt it was trivial to get Email working, so decided it was better to create a plugin. However, the quick flurry of messages on google groups suggested they got it wrong...people expected the same functionality as Play 1.x.

正如您对社区的期望,很快就构建了一个插件.请参阅 https://github.com/playframework/play-mailer.

As you expect from the community though, a plugin was quickly built. See https://github.com/playframework/play-mailer.

还会有更多的插件需要注意,但这是核心开发人员支持的类型安全插件,所以我希望它得到最好的维护.

There will be more plugins to look out for as well, but this is the typesafe supported one by a core developer, so I expect it to be the best maintained.

这篇关于在 Playframework 2.0 中发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆