Setting up a Gmail Account to work with ActionMailer in Rails 3

不问归期 提交于 2019-11-28 03:28:02

If you are using the development environment, change the development.rb to raise delivery errors, with config.action_mailer.raise_delivery_errors = true

Also, the problem might be that :user_name should be the entire email address (myemail@gmail.com), that's how Gmail authenticates users.

domain does not necessarily have to be "gmail.com". You can put your own domain here is you wish.

You also need to specify :from. I found that if you deliver your email with .deliver you do not get an exception for the errors. Try .deliver! instead. With .deliver! you get details about what is wrong.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!