You will get SMTP error "555 5.5.4 Unsupported option: <[email protected]>". It's because of fantom SmtpClient taking sender address for MAIL FROM: directly from Email object.
I guess that we should have an ability to set the MAIL FROM: parameter regardless of MIME From: header. Or, like an other variant, the SmtpClient can became smarter and parse the Email.from field to take only the correct part of it.
Any way, we have to send commands to SMTP server like this:
Yeah, we've actually run into that bug in our own email use. I think the simplest solution is to use full MIME email addresses for the from, to, cc, and bcc fields. Then strip the addr-spec part our for the SMTP exchange. So I added a MimeUtil.toAddrSpec method and made the fixes.
trigan_d Wed 25 May 2011
Hi everybody.
It looks like a bug, but I'm not sure. Correct me if I'm wrong.
Try to send an email with
from
field set to something likeYou will get SMTP error "555 5.5.4 Unsupported option: <[email protected]>". It's because of fantom
SmtpClient
taking sender address for MAIL FROM: directly fromEmail
object.I guess that we should have an ability to set the MAIL FROM: parameter regardless of MIME From: header. Or, like an other variant, the
SmtpClient
can became smarter and parse theEmail.from
field to take only the correct part of it.Any way, we have to send commands to SMTP server like this:
brian Wed 25 May 2011
Promoted to ticket #1545 and assigned to brian
brian Wed 25 May 2011
Ticket resolved in 1.0.59
Yeah, we've actually run into that bug in our own email use. I think the simplest solution is to use full MIME email addresses for the from, to, cc, and bcc fields. Then strip the addr-spec part our for the SMTP exchange. So I added a MimeUtil.toAddrSpec method and made the fixes.
changeset