我的用户使用这种格式的电子邮件:“[email protected]”。 Mailgun验证成功,但Rails无法将电子邮件发送到该地址。我在Mandrill中使用SMTP。 这是错误消息:带SMTP的ActionMailer - 不良收件人地址语法
/home/johnny/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/smtp.rb:948:in `check_response': 401 4.1.3 Bad recipient address syntax (Net::SMTPServerBusy)
你有什么想法?
在此先感谢。
更新时间:
此示例代码(凭有效配置SMTP)将引发错误:
#!/usr/bin/env ruby
require 'mail'
options = {
address: "smtp.mandrillapp.com",
port: 587,
domain: "mydomain.com",
authentication: "login",
user_name: "[email protected]",
password: "mypassword",
enable_starttls_auto: false
}
Mail.defaults do
delivery_method :smtp, options
end
Mail.deliver do
from '[email protected]'
to "[email protected]"
subject 'Testing sendmail'
body 'Testing sendmail'
end
约出一些示例代码是什么?例如。邮件发送代码和/或smtp配置? – marzapower
代码和配置工作正常,错误只会随电子邮件引发。 –