File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes Java Mail API 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 API" Watch "Java Mail API" New topic
Author

Java Mail API

karthik mama
Ranch Hand

Joined: Aug 27, 2007
Posts: 34
Hi,
I want to setup a java application to send mail using javax.mail api. Please tell me what all is needed? like the mail server, the settings etc
How can Websphere Application Server v6.1 be used as a mail server?
Please help me with the details like SMTP host name,password,user name. i'm actually new to this .....
Thanks,
karthik mama
Ranch Hand

Joined: Aug 27, 2007
Posts: 34
Im getting an exception

javax.mail.SendFailedException: Sending failed;
nested exception is:
class javax.mail.MessagingException: Exception reading response;

Please someone help
Vinoth Thirunavukarasu
Ranch Hand

Joined: Dec 18, 2008
Posts: 164

Hi,
The bellow link will help you to send mail using java.Here.
You must have Properties, Session, MimeMessage, BodyPart, MultiPart and Transport class. We need a host name, smpt, from address, to address, body text and a subject.

Regards,
Vinoth.


Java Best Practices
Linux Best Practices
Amortization Calculator

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

karthik mama wrote:How can Websphere Application Server v6.1 be used as a mail server?
That isn't a good idea. It's designed to be a web application server. If you have Websphere and need to send e-mail, it's extremely likely that you already have an e-mail (SMTP) server available.
karthik mama wrote:Please help me with the details like SMTP host name,password,user name. i'm actually new to this.
All of those are things that we can't tell you. If you go to the network administrators in your company, they should be able to tell you the address of your company's SMTP server and how to authenticate to it.
karthik mama
Ranch Hand

Joined: Aug 27, 2007
Posts: 34
hmm thanks a lot......
 
GeeCON Prague 2014
 
subject: Java Mail API