Yet Another GMAIL client
Project description
yagmail is a GMAIL/SMTP client that aims to make it as simple as possible to send emails.
Sending an Email is as simple:
import yagmail
yag = yagmail.SMTP()
contents = [
"This is the body, and here is just text http://somedomain/image.png",
"You can find an audio file attached.", '/local/path/to/song.mp3'
]
yag.send('to@someone.com', 'subject', contents)
# Alternatively, with a simple one-liner:
yagmail.SMTP('mygmailusername').send('to@someone.com', 'subject', contents)
Note that yagmail will read the password securely from your keyring, see the section on Username and Password in the repository’s README for further details. If you do not want this, you can initialize yagmail.SMTP like this:
yag = yagmail.SMTP('mygmailusername', 'mygmailpassword')
but honestly, do you want to have your password written in your script?
For further documentation and examples, please go to https://github.com/kootenpv/yagmail.
The full documentation is available at http://yagmail.readthedocs.io/en/latest/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yagmail-0.14.244.tar.gz
(18.4 kB
view hashes)
Built Distribution
Close
Hashes for yagmail-0.14.244-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64946c2fd5ad869ddf3a86553be239dfc1a0e4cc9d03c494dd8ea4cab909fcb0 |
|
MD5 | 750ccdfca4b16ba5980c6d6b16d16498 |
|
BLAKE2b-256 | a2e72f61e85154c0854c1c175259c72bac9aac973bcb50eb9d00c53bafdee0f3 |