ส่งเมล์ด้วย 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
2022-10-26 17:33:11 - @ratanon
- synchronous : https://github.com/kootenpv/yagmail 2.x Support
- asynchronous : https://github.com/kootenpv/aioyagmail 2.x No Support
# after installation with # pip install yagmail[all] import yagmail yag = yagmail.SMTP(EMAIL_ADDRESS, EMAIL_PASSWORD) yag.send("to@someone.com", "subject", "message")