JavaMailSender - Support for DSNs and Notifications?
The spring integration for JavaMail provides a wrapper for MimeMessages which enables (among other features) correct encoding of metadata. However by extending MimeMessage from the JavaMail API this prohibits the use of special SMTP-Options such as request for Delivery Status Notifications.
My current workaround is to cast JavaMailSender to its Impl-class in order to get a session object, with that I'm able to create the proper SmtpMessage object which can be used with the rest of the Spring integration API. This is obviously a crude workaround, are there other ways to use features, such as DSNs?