This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 18541
    
    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: 18541
    
    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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Java Mail and JBoss
 
Similar Threads
code for sending mail to lotus notes.
sending emil with spring mail abstact layer
java mail doubt
[JBoss AS 5.1.0 GA] Sending email, configuring mail-service.
Attachements in Java mail