[jboss-user] JBoss & Java Mail API: mail-service.xml configuration issue?
Stephen Davidson
gorky at freenet.carleton.ca
Sat Feb 9 13:51:45 EST 2008
Hi Frusso.
I have in my code the following;
String from = ........
......
if (from == null)
throw new IllegalArgumentException("No Origin Address");
msg.setFrom(new InternetAddress(from));
Note: This dates back to 2002, so I don't remember everything about this API
right now, although I think that should be an NPE rather a
IllegalArgumentException getting thrown. But I think one gets the idea of what
the Java code is doing to send a message. I don't recall if the from was
needed, but it kind of looks like it from this snippet.
Regards,
Steve
frusso at email.it wrote:
> Hi everybody,
> I'm a newbie in using JBoss and I'm trying to write a simple session
> bean that should provide kinda mail-delivery facility.
>
> I've been googling for a couple of nights to finds docs explaining how
> to properly configure JBoss in order to be able to send mails by means
> of the Java Mail API, but I must confess I did not succeeded. I've only
> found out that it should be sufficient customizing the
> "mail-service.xml" file found under de deploy folder of (for example)
> the default folder. That's why I configured it in the following way:
More information about the jboss-user
mailing list