application.conf 中的 `mail.from` 在哪里定义?
Where is `mail.from` in application.conf defined?
我注意到 application.conf
中的以下配置:
mail.from ="dwplaydemo <mailrobot@dwplaydemo.net>
我想这与 Play
对发送电子邮件的支持有关。但是我找不到 mail
对象的定义位置。我在哪里可以找到我可以在 mail
中配置的所有属性?
显然您正在关注 IBM's tutorial 使用 Play Framework 和 Scala 进行 Web 开发。
如果您从本教程提供的源代码中查找 app/utils/Mailer.scala
中的 class Mailer
,您会发现 mail.from
只是定义为外部化发件人 属性.
class Mailer @Inject() (configuration: Configuration, mailer: MailerClient) {
val from = configuration.getString("mail.from").get
val replyTo = configuration.getString("mail.reply")
...
此 class 取决于项目 GitHub 页面的 play-mailer
. For a full list of configuration properties of this mailer, see the Getting Started section。
我注意到 application.conf
中的以下配置:
mail.from ="dwplaydemo <mailrobot@dwplaydemo.net>
我想这与 Play
对发送电子邮件的支持有关。但是我找不到 mail
对象的定义位置。我在哪里可以找到我可以在 mail
中配置的所有属性?
显然您正在关注 IBM's tutorial 使用 Play Framework 和 Scala 进行 Web 开发。
如果您从本教程提供的源代码中查找 app/utils/Mailer.scala
中的 class Mailer
,您会发现 mail.from
只是定义为外部化发件人 属性.
class Mailer @Inject() (configuration: Configuration, mailer: MailerClient) {
val from = configuration.getString("mail.from").get
val replyTo = configuration.getString("mail.reply")
...
此 class 取决于项目 GitHub 页面的 play-mailer
. For a full list of configuration properties of this mailer, see the Getting Started section。