-
-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for the mail envelope from #102
Comments
Isn't this the replyTo you are referring to? |
Actually the replyTo enables to set an address that will be used when the recipient will answer the mail. Usually the default behavior is correct: we want the sender to be directly notified when an email could not be sent. |
It's also written that the from address should be filled by the receiving party, not the sending party. I'm still looking into it, but it's a little confusing. |
It seems that this is the However this field should be based on the mail envelope from value that is sent to the mail server before the mail object. Currently I made some tests with Google accounts and non existing email providers: each time the SMTP server I am connecting to (a postfix server on my network, not the Google mail server) is notifying me on the correct address (not the one I sent the e-mail from). |
Excellent, I'll add it in this weekend. Thanks for the tests! |
Thank you for your help! If you want, I can also make a test with the |
Currently working on these changes. Going to name it bounceToRecipient
The JavaDoc will explain it will optionally set the Return-Path / Envelope FROM as a hint for the SMTP server to return bouncing emails to... |
That sounds perfect, thank you!! |
#102: When parsing MimeMessage to Email, also include the Return-Path as bounceToAddress #95: When parsing MimeMessage to Email, also include the Return-Receipt-To #93: When parsing MimeMessage to Email, also include the Disposition-Notification-To Other: Overhauled MimeMessageParser to be more useful and usable (including better exceptions)
To handle bounced emails with a dedicated email address, it is required to set the envelope from mail address: https://stackoverflow.com/questions/1782659/how-to-set-the-return-path-to-an-email-address-other-than-sender-address-using-j
Currently Simple Java Mail enables to set the SMTP parameter
mail.smtp.from
via the configuration of theSession
of theMailer
.It would be great if Simple Java Mail could:
mail.smtp.from
option directly (so users won't have to deal with theSession
object),SMTPMessage
in the stackoverflow issue works: I have not tested it yet).If that's ok, I can help implementing these features (and also test the solution with
SMTPMessage
).The text was updated successfully, but these errors were encountered: