开发者

issue with specifying name while sending mail

开发者 https://www.devze.com 2023-03-05 18:11 出处:网络
My co开发者_Go百科de:-- from = @site.name + \", <no-reply@\" + @site.url + \">\" mail(:from => from , :to => @recipient.email, :subject => \"Invitation mail\")

My co开发者_Go百科de:--

from = @site.name + ", <no-reply@" + @site.url + ">"
mail(:from => from , :to => @recipient.email, :subject => "Invitation mail") 

Error is:--

 Net::SMTPSyntaxError (501 5.1.7 Bad sender address syntax 
):


Get rid of the comma between @site.name and your < bracket. You're trying to do this:

My Name, <no-reply@mysite.com>

When it should be:

My Name <no-reply@mysite.com>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号