1. Create Auth File

First create directory for storing authentication files. Now, create an auth file with any name like smtp-auth and add the following content. Replace the above email with your gmail or google apps email. Now create a hash map file of above created auth file.

2. Configure Sendmail with SMART_HOST

Now add following configuration lines into your sendmail.mc configuration file below “MAILER” definition. In the next step we will need to re-build sendmail’s configuration. To do that execute:

3. Verify Setup

After completing all the above configuration’s, reload the sendmail service to apply changes. Now send a test email to verify everything is working fine.