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.