Send Email Without authentication in java using gmail smtp server and javamail -
Send Email Without authentication in java using gmail smtp server and javamail -
i using javamail api , gmail smtp server send mail service in java without giving password. have using below code. here using javax.mail jar file
properties props= new properties(); props.put("mail.smtp.host", "smtp.gmail.com"); props.put("mail.smtp.port", 587); props.put("mail.transport.protocal", "smtps"); //put below false, if no https needed props.put("mail.smtp.starttls.enable", "false"); props.put("mail.smtp.auth", "false"); session session = session.getinstance(props);
i getting below error
must issue starttls command first. b4sm3005855pdh.2 - gsmtp
is there wrong in implementing code? posssible implement without password ? pls 1 help me on this
first, name of property "mail.smtp.starttls.enable".
second, no, can't send mail service through gmail without authenticating first, e.g., using password.
java email javamail
Comments
Post a Comment