development.rb 中:
config.action_mailer.smtp_settings = {
:address => "smtpcloud.sohu.com",
:port => 25,
:authentication => :login,
:domain => "我的发信域名",
:user_name => "我的api user",
:password => "我的api key"
}
其他写法是按照 ActionMailer 的 guide 来的。另外域名也已经验证通过了。
返回如下:
UserMailer#welcome: processed outbound mail in 10.7ms
Sent mail to {收件地址} (1095.0ms)
Date: Mon, 18 Jan 2016 17:23:23 +0800
From: {发件地址}
To: {收件地址}
Message-ID: <569caf0b20afc_ba03ffaba3bc58c85776@matabuns-MacBook-Pro.local.mail>
Subject: Welcome
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: quoted-printable
...
EOFError (end of file reached):
注意:个人信息已做处理。
不知道哪里做得不对,能否指点一二?
===
后来证明是所有的邮件必须都有对应的模板存在才可以。。我真是给这个错误提示跪了