Skip to content
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 native API for setting Disposition-Notification-To header #93

Closed
dormitionskete opened this issue Aug 14, 2017 · 5 comments
Closed

Comments

@dormitionskete
Copy link

I recently became acquainted with SimpleJavaMail. I've been testing it for a few days, and so far, I like it very much. Thank you very much for making it, and sharing it with us!

On your website, you asked for suggestions for how it could be improved. I have a few "wishlist" items for it. I'll put them in separate tickets so you can evaluate and track them individually.


Please consider adding a method to set Return Receipt Requested information:

email.setReturnReceiptRequested(MsgFromAddress) // or other address

if (bReturnReceiptRequested) {
   msg.setHeader("Disposition-Notification-To", getMsgFrom());
}

Yes, we could set it with a custom header, but it would be nice if we didn't have to program it ourselves -- especially so people don't need to learn the intricacies of mail headers.

@bbottema bbottema added this to the 4.4.0 milestone Aug 14, 2017
@bbottema
Copy link
Owner

Agreed.

What about a custom notification reply (https://stackoverflow.com/questions/25600405/how-to-create-a-return-receipt-email-javamail)? I haven't looked into this before though.

@dormitionskete
Copy link
Author

I believe we're talking about the same thing here. It's just a simple addition:

email.addHeader("Disposition-Notification-To", msgFromAddress;

@bbottema
Copy link
Owner

What I get from that stackoverflow answer is that you can have a custom return-body embedded.

Create a MultipartReport object, populate it with a DispositionNotification object, the text to display to the user, and optionally the original message. Use the Message.setContent method to set the MultipartReport as the content of the new message that you send back as the read receipt notification.

I'm not sure I've ever encountered such a custom return-email. Perhaps for a follow-up feature lateron. For now we can focus on just the notification address.

@dormitionskete
Copy link
Author

I think you're right. I don't think I've ever encountered it, either...

And I agree. I think I'd save it for another day, and see if someone requests it. I think spending quality time with your little one(s) would probably be a better use of your time!

Thank you again.

@bbottema bbottema changed the title Simple Java Mail Wishlist -- email.setReturnReceiptRequested Add support native API for setting return-notification-header Aug 15, 2017
@bbottema bbottema changed the title Add support native API for setting return-notification-header Add support native API for setting Disposition-Notification-To header Aug 15, 2017
bbottema added a commit that referenced this issue Aug 15, 2017
bbottema pushed a commit that referenced this issue Aug 16, 2017
@bbottema
Copy link
Owner

Release in 4.4.0. Please verify.

@bbottema bbottema modified the milestones: 4.4.2, 4.4.0, 4.4.3 Aug 21, 2017
bbottema added a commit that referenced this issue Nov 12, 2017
#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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants