Github user rpmiskin commented on the pull request:
https://github.com/apache/nifi/pull/187#issuecomment-176588865
@JPercivall
I believe SMTPTransport will pick up the from address from a couple of
other places in preference to the FROM header, so I don't think it should
necessarily be required.
From com.sun.mail.smtp.SMTPTransport.mailFrom():
Issue the MAIL FROM: command to start sending a message.
Gets the sender's address in the following order:
SMTPMessage.getEnvelopeFrom()
mail.smtp.from property
From: header in the message
System username using the InternetAddress.getLocalAddress() method
How about I update it so that the FROM property descriptor is optional, but
if it is set it must evaluate to a valid InternetAddress? Should the same
logic be applied to the other InternetAddress values?
Thanks for creating the other jira issue, I'll add some tests as part of my
change but probably won't look to get 100% coverage of existing functionality.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---