wood burning stoves 2.0
The moose likes Other JSE/JEE APIs and the fly likes Sending Mail using smtp.mai.yahoo.com 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 "Sending Mail using smtp.mai.yahoo.com" Watch "Sending Mail using smtp.mai.yahoo.com" New topic

Sending Mail using smtp.mai.yahoo.com

Mayank Jain

Joined: Apr 12, 2004
Posts: 1
I am trying to send mail to some correct & existing E-Mail IDs, from a stand-alone java application using Java Mail API.
No exception is thrown while sending the mail, but the mail is not reaching to the target mail-nox.
Code :
props.put("mail.smtp.host", _host);//smtp.mail.yahoo.com
props.put("mail.smtp.user", _user); //xyz .

props.put("mail.smtp.auth", "true");

_session = Session.getInstance(props, null);

_transport = _session.getTransport("smtp");
_transport.connect(_host, _user, _pwd);
_transport.sendMessage(mimeMsg, mimeMsg.getAllRecipients());

Please note that in the mimeMsg.setFrom(); I am passing a user name, its not a complete E-Mail address. that is for a e-mail address xyz@yahoo.com, I am passing xyz.
I agree. Here's the link: http://aspose.com/file-tools
subject: Sending Mail using smtp.mai.yahoo.com
It's not a secret anymore!