【发布时间】:2023-03-26 15:09:02
【问题描述】:
我正在尝试设置异步电子邮件发送。我正在使用延迟作业。没有 delay_job 一切正常,没有任何错误。但是当我添加时:
handle_asynchronously :mail_sending_method
我收到以下错误:
A sender (Return-Path, Sender or From) required to send a message
我使用 ActionMailer 发送邮件,具体如下:
mail(:to => user.email, :from => "notifications@example.com", :subject => "Blah")
方法如下:
def phrase_email(user, tweet, keyword, phrase)
@user = user
@tweet = tweet
@keyword = keyword
@phrase = phrase
mail(:to => user.email, :from => "notifications@example.com", :subject => "Weekapp Phrase Notification")
end
【问题讨论】:
-
你能发帖
mail_sending_method吗??
标签: ruby-on-rails email asynchronous delayed-job