mail-api icon indicating copy to clipboard operation
mail-api copied to clipboard

Allow Requesting different Delivery Status Notifications per recipient

Open glassfishrobot opened this issue 12 years ago • 5 comments

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 avatar Feb 09 '13 22:02 glassfishrobot

  • Issue Imported From: https://github.com/javaee/javamail/issues/58
  • Original Issue Raised By:@glassfishrobot
  • Original Issue Assigned To: @bshannon

glassfishrobot avatar Sep 10 '18 05:09 glassfishrobot

@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=[email protected],[email protected]]; [FAILURE=[email protected],[email protected]]");

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 avatar Feb 05 '14 00:02 glassfishrobot

@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 avatar Feb 05 '14 00:02 glassfishrobot

@glassfishrobot Commented Reported by Revivius

glassfishrobot avatar Feb 09 '13 22:02 glassfishrobot

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

glassfishrobot avatar May 02 '17 07:05 glassfishrobot