Reputation: 261
I am trying to send emails from my rails 2.5 app through Amazon SES. For some reason, it won't accept my emails when the FROM address has a name I.E.
"Chuck Norris" <[email protected]>
If I send the FROM email address as just [email protected], then it sends along just fine, so I know that the action mailer config is right.
I read the docs and still have no ideas about why it's failing. The address seems to be formatted correctly, and sends just fine through any other SMTP relay.
When I write the email address to the log file I see this:
"Saint Leo Admissions" <[email protected]>
Which looks good to me. But when I try to send the email, Amazon responds with this error message:
553 <Saint Leo Admissions <[email protected]> Invalid email address.
As you can see, the email address looks different when I dump it than it does in the error message. I've been stuck on this for a couple days. I even tried using a gem that is supposed to correctly format email addresses and had the same problem. I also tried single quotes around the vanity name and that gives me the same error. If I try to remove the <> then i get this error 501 Invalid MAIL FROM address provided
I'm stuck. Any ideas?
Upvotes: 5
Views: 2523
Reputation: 29078
I also experienced this issue while using the mail gem in Rails.
I checked and confirmed that the email domain that I was using was verified in Amazon SES.
The issue was that there was a comma in my email address sender.
Here's how I solved it:
The previous email was
Clarence Dickson, DL <[email protected]>"
I simply removed the comma after Clarence Dickson
Clarence Dickson DL <[email protected]>"
That's all.
I hope this helps
Upvotes: 1