Blog

Managed File Transfer and Network Solutions

Sending Email Using Java GMail and SMTP

Posted by Van Glass on Mon, Aug 01, 2011 @ 03:51 PM


Google allows GMail account users to access their account using any capable email client such as Microsoft Outlook, Apple Mail.app and others. For this to work GMail provides POP and IMAP access to these client applications so that they can access emails stored on GMail servers. In addition to this, GMail provides access to its SMTP server to allow these clients to send emails through it.

In order to prevent abuse such as spamming and to provide increased security the GMail SMTP server requires that you connect using SMTP SSL and login using your account credentials prior to sending any mail.

The purpose of this article is to demonstrate how to securely connect to the GMail SMTP server and send mail using a bit of Java code which make use of com.jscape.inet.smtpssl.SmtpSsl class found in Secure iNet Factory.

The procedures in this article may also apply to other SMTP servers that provide secure SSL/TLS access.

Prerequisites

GMail account
Secure iNet Factory

Read More

Topics: Secure iNet Factory