Commons API-Sending email using Gmail SSL

In this example we will learn about sending text email using GMAIL.
Steps to create a text Email
  • Create Email instance.

  • Set the host name of the server smtp.googlemail.com

  • Set email account details .

  • Set email address for To and From.

  • Set Email subject and content of the Email.

  • Finally sending mail


SourceFile: TextEmail.java Output:
Email sent successfully 

For verification purpose, check in receivers inbox.
Download: Commons API-Sending email using Gmail SSL
SHARE

    Blogger Comment
    Facebook Comment

0 comments :

Post a Comment