[jboss-user] [JBoss Seam] - Re: Seam mail - How to use the default
petemuir
do-not-reply at jboss.com
Sun Feb 4 07:41:23 EST 2007
Ah :)
Having looked JavaMail sendMessage() I was wondering how it was uisng mail.from to set the From: address (as opposed to the Return-path:)
I'm not really convinced that this is a good hack. The same thing can be easily avoided with no recompilation:
1) either edit a facelets template or
2) components.xml
(n.b. you could easily use ant to do this)
Or, if you are really don't like this, extend UIMessage and in encodeEnd use something like:
if (findMimeMessage().getFrom() == null) {
| mailFrom = getMailSession().getProperty("mail.from");
| findMimeMessage().setFrom(new InternetAddress(mailFrom));
| }
| super.encodeEnd(contenxt);
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4010806#4010806
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4010806
More information about the jboss-user
mailing list