我想从我的Rails 5应用程序创建一封电子邮件,并且我想为每个环境设置“From:”地址。所以我创建的配置/初始化/ mailer_config.rb丝毫此内容 if defined?(Rails)
case Rails.env
when "production"
RAILS_FROM_EMAIL = "[email protected]"
when "t
我正在使用Rails 5并试图使用Gmail作为中继从我的开发计算机发送一些电子邮件。我有这样的邮件文件,应用程序/邮寄/ user_notifier.rb class UserNotifier < ActionMailer::Base
default from: RAILS_FROM_EMAIL
# send notification email to user about
在这个脚本完美运行之前,我最近三天面临这个问题。现在收到错误: SMTP ERROR: Failed to connect to server: (0) 2017-10-06 21:05:34 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting Message was not sent