-
1. Re: Retrieve rendered mail content
nickarls Mar 18, 2008 9:41 PM (in response to danielc.roth)Well, you could set mailsession debug to true and the mail might end up somewhere in a log or you might add a debug-mailbox to the cc-list but I think it might be a little hard to intercept programmatically in realtime.
Of course, if you are OK with modified Seam code it should be pretty easy to add an observer that passes you the mail right before it is sent.
-
2. Re: Retrieve rendered mail content
pmuir Mar 19, 2008 12:31 PM (in response to danielc.roth)Create a new mail transport that you control the endpoint of (see for example org.jboss.seam.mock.MockTransport), register it in /META-INF/javamail.providers, and tell the MailSession to use it by calling MailSession.instance().setTransport(name);
-
3. Re: Retrieve rendered mail content
danielc.roth Mar 26, 2008 2:08 PM (in response to danielc.roth)Worked like a charm, except for 'MailSession.instance().setTransport(name)', since 'transport' only is gettable and needs to be set in components.xml. (There is some info about that in MockTransport.java)
I'll subtract 1 star due to that misinformation ;-)
-
4. Re: Retrieve rendered mail content
pmuir Mar 28, 2008 4:48 PM (in response to danielc.roth)Oh yeah, as MailSession is @Unwrap ;-)