ส่งเมล์ด้วย Lib YaGmail on Python

The above Python code makes email sending easy. It can be a great start for creating some automation or notification systems. If you would like to have more functionality, you can code it yourself or use existing packages. I would recommend yagmail for advanced email sending (if you would like to send attachments, HTML version of the content). The usage of yagmail is simple

# after installation with
# pip install yagmail[all]

import yagmail
yag = yagmail.SMTP(EMAIL_ADDRESS, EMAIL_PASSWORD)
yag.send("[email protected]", "subject", "message")

https://yagmail.readthedocs.io/en/latest/setup.html

0
225