Posted on Here are two examples to show you how to use JavaMail API method to send an email via Gmail SMTP server, using both TLS and SSL connection. To run this example, you need two dependency libraries – javaee.jar and mail.jar, both are bundle in JavaEE SDK. Outgoing Mail (SMTP) Server requires TLS or SSL: smtp.gmail.com (use authentication) Use Authentication: Yes Port for TLS/STARTTLS: 587 Port for SSL: 465 1.
Read full article from JavaMail API – Sending email via Gmail SMTP example
No comments:
Post a Comment