开发者

issue with specifying name while sending 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜