开发者

actionmailer formatted from

开发者 https://www.devze.com 2022-12-25 10:53 出处:网络
I want to send emails with formatted sender such as \"Support team foo@bar.com\". If delivery method I wrote from \"support team <foo@bar.com>\" and from \"\\\"support team\\\" <foo@bar.com&

I want to send emails with formatted sender such as "Support team foo@bar.com".

If delivery method I wrote from "support team <foo@bar.com>" and from "\"support team\" <foo@bar.com>" but smtp server says

#<Net::SMTPSyntaxError: 501 <support team <foo@bar.com>>: "@" or "." expected after "support"

This means that rails puts full "from" string into braces. How can I fix this without monkey开发者_开发知识库patching?


 @from         = "\"support team\" <foo@bar.com>"

Ref:- Rails ActionMailer - format sender and recipient name/email address

http://jrmehle.com/2009/05/09/setting-email-and-name-with-actionmailer/

OR TRY

From        ["support team <foo@bar.com>"]
0

精彩评论

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