[jboss-user] [JBoss Seam] - Configuring Seam Mail programmatically

mahbe do-not-reply at jboss.com
Mon Jan 14 11:57:38 EST 2008


Hi,

is it possible to configure Seam Mail programmatically?

I've already been using Seam Mail and configured it with <mail:mail-session ...> in components.xml. That works fine.

But how to configure settings like hostname or port of the mailserver at runtime? I tried
MailSession session = new MailSession().create();
  | session.setHost("mailserver");
  | session.setPort(4711);
before I sent mail via
renderer.render("/email-template.xhtml");

But those settings do not work. I also tried some variations like this
@In(create = true)
  | MailSession mailSession;
  | ...

In this case a exception is thrown (...could not set field value...). Unfortunately the API documentation on Seam Mail is not very detailed.

Best Regards, Matthias

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4119724#4119724

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4119724



More information about the jboss-user mailing list