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

Allow Requesting different Delivery Status Notifications per recipient #58

Open
glassfishrobot opened this issue Feb 9, 2013 · 5 comments
Assignees

Comments

@glassfishrobot
Copy link

Java Mail API doesn't provide a way to request "different DSN(Delivery Status Notification)s per-recipient" as explained by RFC1891. There is SMTPMessage.setNotifyOptions(int options) but it applies to all recipients in the message.

Suggested workaround is sending multiple 'copies' of the message with a single recipient and desired DSN for that recipient. This is inconvenient because:

  • Number of recipients and/or message size may be considerably high
  • Sending multiple messages will create different instances (with different Message-IDs) that will be harder to track (mainly for administration purposes on server and client)

Requested enhancement is to allow specifying DSN for each recipient.

Please see:
https://forums.oracle.com/forums/thread.jspa?threadID=2493438&tstart=0

Affected Versions

1.4.5

Environment

All
All

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
Reported by Revivius

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
@bshannon said:
A similar request was filed in the old Sun bug system, and included this
suggestion:

When sending rcpt commands use the dsn notification properties specified for
the receipient currently processing.
To implement this in backward compatible way something like this:

props.put("mail.smtp.dsn.notify", "[SUCCESS=mike@mymail.com,James@mymail.com];
[FAILURE=mike@mymail.com,James@mymail.com]");

when the value starts with a '[' than get the DSN properties per receipient
else use fallback to the old way. In this way no code that uses the mail api
should break.

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
@bshannon said:
A clean way to do this might be to add a DSNInternetAddress class
that allows DSN information to be specified for each address, but
that would require MimeMessage to keep track of the original Address
objects instead of immediately serializing them to the headers.
A simple solution as proposed above might be easier in the short term.

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
This issue was imported from Bugzilla JAVAMAIL-5821

@glassfishrobot
Copy link
Author

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