GeeCON Prague 2014*
The moose likes Other JSE/JEE APIs and the fly likes Java Mail and JBoss Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Java Mail and JBoss" Watch "Java Mail and JBoss" New topic
Author

Java Mail and JBoss

Andrew Mcmurray
Ranch Hand

Joined: Sep 24, 2005
Posts: 188
Hi all

Kind of lost and need some help. I have never done this before. I am getting form data and would like to format it and send it in an email using whatever mail service Jboss provides. Assuming that I can configure JBoss, is Java Mail what I need to send the email? If so is there any examples on how to do this?

Thanks,

AMD
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

Yes. JBoss is a J2EE server and so it automatically includes JavaMail. If you ask your favourite web search engine to look for "javamail tutorial" or "javamail examples" you're sure to find out how to use JavaMail. Unless you were asking how to configure JBoss to set up a mail session, that I don't know how to do.
Andrew Mcmurray
Ranch Hand

Joined: Sep 24, 2005
Posts: 188
Thanks Paul. So is JavaMail the best way to go for sending form input via email?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

JavaMail beats connecting to the mail server and sending the low-level commands by a mile. The vast majority of our automated e-mails at work are sent via JavaMail code that I wrote. But if you want an even higher-level (simpler) API you might have a look at Jakarta Commons Email.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Java Mail and JBoss