There's an API? I thought you just connected via SMTP like any other mail server.
server: smtp.gmail.com
SSL port: 465
TLS Port: 587
SSL/TLS required: Yes.
un/pw is your account un/pw.
From there just follow any tutorial for whatever language you want about connecting and sending via SMTP.