Announcement Announcement Module
No announcement yet.
JavaMailSender - Support for DSNs and Notifications? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?

  • #2

    What is your specific use-case? DSNs are technically somewhat unreliable. Also, is your question geared towards Spring or Spring Integration? If the latter, for a good use-case we may add more explicit support to the Spring Ingegration Mail Support




    • #3
      Thanks for your reply.

      I know that DSNs are unreliable in the wide internet, but in our case, we have a controlled environment and know, that the final mailserver (and all hops) support DSN. We still need a receipt for the final delivery of outbound messages so DSNs seemed the best solution.

      Yes, I'm using the Mail Support from Spring Integration. A possible solution would be to add a SmartMimeMessage equivalent for SmtpMessage. Due to the release cycle of Spring such an addition might come to late for our case, but perhaps other people require DSN-Support (or other SMTP-Features), too.