Announcement Announcement Module
Collapse
No announcement yet.
Registering a javax.mail.event.TransportListener with a Spring test layer Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Registering a javax.mail.event.TransportListener with a Spring test layer

    Hello,

    I need to register a javax.mail.event.TransportListener with the test layer of my Spring application in order to be able to determine whether or not emails are being sent.

    I noticed that I can get a javax.mail.Session from a javaMailSenderImpl and in turn I can get a javax.mail.Transport from the Session and I could add a TransportListener to this Transport instance.

    Does it make sense to do all this from the test class?

    Can anyone please provide advice?

    Regards,

    Julien.
Working...
X