kootenpv / yagmail

Send email in Python conveniently for gmail using yagmail
MIT License
2.66k stars 265 forks source link

Please consider that msg["From"] can be customized #229

Closed ghost closed 2 years ago

ghost commented 2 years ago

This is very common. We use professional email services (such as mailgun). They usually provide us with an account with a slightly different brand name. We need to customize the sender.

leffss commented 2 years ago
...
mail_user = {'test@test.com': 'your_alias_name'} 
yag = yagmail.SMTP(user=mail_user, password=mail_pass, host=mail_host, port=mail_ssl_port, smtp_ssl=True)
...