Build SendGrid X-SMTPAPI headers in python