[英]ruby on rails ActionMailer error
I'm trying to use ActionMailer for the first time. 我正在尝试第一次使用ActionMailer。
My mailer looks like this: 我的邮件看起来像这样:
class RequestMailer < ActionMailer::Base
default from: "fred@ameipro.com"
def request_email(worequest)
@worequest = worequest
mail(:to => "dave@ameipro.com", :subject => "New Service Request")
end
end
But, I get the following error: Net::SMTPFatalError in WorequestsController#create 但是,我收到以下错误:WorequestsController#create中的Net :: SMTPFatalError
550 Cannot receive from specified address <fred@ameipro.com>: Unauthenticated senders not allowed
How do I correct? 我该如何纠正? Thanks! 谢谢!
This is an error from the mail server - it is refusing to deliver email from your address. 这是来自邮件服务器的错误-它拒绝从您的地址发送电子邮件。 Thats the part you need to diagnose. 那就是您需要诊断的部分。 To help you, we'd need more information about the server you're trying to send through. 为了帮助您,我们需要有关您要发送的服务器的更多信息。 To troubleshoot, I would try configuring a different client to send through your server, then try to send an email from fred@ameipro.com to dave@ameipro.com and see what happens. 要进行故障排除,我将尝试配置其他客户端以通过您的服务器发送,然后尝试将电子邮件从fred@ameipro.com发送到dave@ameipro.com,看看会发生什么。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.