How to Setup a Google Service Account to Send Email via GMail

Sending GMail from a Google Service Account can be a complicated undertaking w.r.t. setting things up in your Google account correctly. If something is not correct, the only indication of an error will be that the SMTP authentication fails.

The best one can do is to first fully understand Google Service Accounts:

Explaining Google Service Accounts

 

Then read about how to setup your Google Service Account to send email on behalf of a GMail account:

How to Setup a Google Service Account to Send Email via GMail