rails - 发送邮件的几点注意 ( using smtp sending email)
栏目: Ruby on Rails · 发布时间: 7年前
内容简介:1. 普通的配置都默认在 production模式下发送邮件. 所以, 要确认,要么你的环境是 production环境, 要么在开发模式下也可以发送.默认的development.rb中: config.action_mailer.raise_delivery_errors = true2. 在application.rb 中,增加debug日志:
rails - 发送邮件的几点注意 ( using smtp sending email)
访问量: 1
1. 普通的配置都默认在 production模式下发送邮件. 所以, 要确认,要么你的环境是 production环境, 要么在开发模式下也可以发送.
默认的development.rb中: config.action_mailer.raise_delivery_errors = true
2. 在application.rb 中,增加debug日志:
config.action_mailer.raise_delivery_errors = true
重启即可
你会发现, 点击 发送邮件的页面, 需要相应4,5秒种 ,才会刷新, 这个就是邮件发送成功了.
3. 注意: 如果你用的是 google 邮箱, 要先开启 lesssecure设置:
https://myaccount.google.com/lesssecureapps?pli=1
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Approximation Algorithms
Vijay V. Vazirani / Springer / 2001-07-02 / USD 54.95
'This book covers the dominant theoretical approaches to the approximate solution of hard combinatorial optimization and enumeration problems. It contains elegant combinatorial theory, useful and inte......一起来看看 《Approximation Algorithms》 这本书的介绍吧!