Question

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 monkeypatching?

Was it helpful?

Solution

 @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>"]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top