Adding SendGrid as a SMTP relay for ssmtp is easy. Edit /etc/ssmtp/ssmtp.conf and add the following:

1
2
3
4
mailhub=smtp.sendgrid.net:587
AuthUser=sendgridusername
AuthPass=sendgridpassword
UseSTARTTLS=YES
Then restart ssmtp. All set!