sending mail to any website using java servlet

Posted by mrig on Stack Overflow See other posts from Stack Overflow or by mrig
Published on 2012-10-29T04:44:08Z Indexed on 2012/10/29 5:00 UTC
Read the original article Hit count: 112

Filed under:
|

I am using javamail api in java servlet to send mail. It seams to send mail only to gmail Id's, whereas I want it to be able to send to any email ID. Do I require different property value here? I followed http://www.mkyong.com/java/javamail-api-sending-email-via-gmail-smtp-example/ to develop the code. The property values are:

props.setProperty("mail.smtp.host", "smtp.gmail.com");

props.setProperty("mail.smtp.port", "587");

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

props.setProperty("mail.smtp.starttls.enable", "true");

© Stack Overflow or respective owner

Related posts about servlets

Related posts about javamail