Results 1 to 3 of 3

Thread: JavaMailSender - Support for DSNs and Notifications?

  1. #1
    Join Date
    Oct 2012
    Posts
    2

    Default 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. #2
    Join Date
    Aug 2005
    Location
    Atlanta
    Posts
    124

    Default

    Hi,

    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 http://static.springsource.org/sprin...html/mail.html.

    Cheers,

    Gunnar
    Gunnar Hillert
    SpringSource/VMWare, Spring Integration team
    SpringSource Team - Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/ghillert
    http://blog.hillert.com/
    http://blog.springsource.com/author/ghillert/

  3. #3
    Join Date
    Oct 2012
    Posts
    2

    Default

    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.

    Cheers
    Martin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •