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>
精彩评论