This project is archived and is in readonly mode.
ActionMailer: cannot set From header with smtp
-
Jean Vincent
Sorry I failed to format properly the ticket (my first here).
Action Mailer sends SMTP server:
@@@ SMTP MAIL FROM:["admin@example.com"]SMTP server replies: @@@ SMTP 501 <["admin@example.com"]>: missing or malformed local partThis can be fixed by changing line 677 in /usr/local/lib/ruby/gems/1.9.1/gems/actionmailer-2.3.2/lib/action_mailer/base.rb from:
@@@ Ruby sender = (mail['return-path'] && mail['return-path'].spec) || mail.fromto: @@@ Ruby sender = (mail['return-path'] && mail['return-path'].spec) || mail['from'] -
Jean Vincent
I found that this is similar to #2340 action mailer can't deliver mail via smtp on ruby 1.9.1.
This isn't obvious from the title. Action Mailer works if one does not set the from header with an email address.
That said, one still cannot set a full (named) rfc2822 email address.
-
Yehuda Katz (wycats)
- Assigned user set to Yehuda Katz (wycats)
- State changed from new to hold
- Tag changed from 2.3.2, actionmailer, restful_authentication to 3.0, actionmailer, restful_authentication
- Milestone cleared.
This will be addressed when we rework ActionMailer for 3.0. In the meantime, if you'd like to submit a patch against 2.3 we'll gladly accept it :)