I am playing around with the python mailjet api, and found that I can set the sender's name so instead of emails showing up from "Info" (info@example.com) I can have them show up from "Carlos". I would also like to add a profile picture like that of Southwest Airlines or Twitter.
Anyone have any idea how I might do that?
I know that if I don't post code then people get angry, so here's some code:
mailjet = Client(auth=(API_KEY, API_PASSWORD), version='v3.1')
data = {
'Messages': [
{
"From": {
"Email": "info@example.com",
"Name": "Carlos"
},
"To": [
{
"Email": trip.email
}
],
"Subject": "Subject of the message",
"TextPart":"This is the body of the message",
"Headers": {
"X-My-Header": "https://www.example.com/profile_pic.png"
}
}
]
}
mailjet.send.create(data=data)