• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Sending Mail using smtp.mai.yahoo.com

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Hug your destiny! And hug this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic