Sending emails from local host - Play Framework

Does anybody know the `smtp` settings that need to be applied within the `application.conf` file of a Play Framework project for sending emails on localhost? During my unit testing I am getting the error: > A play.exceptions.MailException has been caught, Cannot send email The developers at Play have made sending emails so easy that the only way I could be messing up is with my settings in the config file. I have tried just using: mail.smtp=mock And I tried commenting out the line above and using: Neither of these two approaches work. I understand that this is probably a very noob question, but I have never really dealt with setting up emails before - so I am grateful for any help that can be contributed. If it is the case that I am unable to send email as Play would not work as an SMTP server, is there any way that I can use `mail.smtp=mock` to 'mock send' an email and allow my tests to pass? **Useful Link** [This is a link to the Play documentation for sending emails](
I would think that you would need to have a mail server setup on your local machine to accept the email. You could use so that your mail does not go anywhere.

以上就是Sending emails from local host - Play Framework的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准