我遇到了这个错误“Net::SMTPSyntaxError (502 5.5.1 Unrecognized command”
我有这个代码工作:
class Notifier < ActionMailer::Base
default :from => "sammy@mysite.tv"
def comment_updated(comment, user)
@comment = comment
@user = user
mail(:to => user.email,
:subject => "[JS] #{comment.job.subject_name} - # {comment.job.subject_name}")
end
end
但是下面的代码会抛出这个错误“Net::SMTPSyntaxError (502 5.5.1 Unrecognized command”:
class Notifier < ActionMailer::Base
default :from => "sammy@mysite.tv"
def comment_updated(comment, user)
@comment = comment
@user = user
mail(:to => user.email,
:subject => "[JS] #{comment.job.subject_name} - #{comment.job.subject_name}",
:from => "jSearch
<comment+#{comment.job_id}@mysite.tv>") do |format|
format.text
format.html
end
end
end
我想使用 Cloudmailin 服务来处理我收到的电子邮件,所以我想在用户点击回复时有一个 :from 地址。
知道为什么这个带有额外 :from 的代码不起作用吗?