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/.
Metadata
Release files for yagmail 0.14.256
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| yagmail-0.14.256.tar.gz | 18.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| yagmail-0.14.256-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 34.1 kB
Release files / yagmail-0.14.256.tar.gz
| Download URL | yagmail-0.14.256.tar.gz |
|---|---|
| Size | 18.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
88f20899a193025fcdc6c93d2781abbcd2f029d99e6242f67d5fbb15e1ebc366
|
|
BLAKE2b-256 checksum How to use checksums |
2e8ad2d3b5fe3dcd43a5188ecd2bd3770df09243f72eab33cf8ca4bd0715324d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.7
|
Release files / yagmail-0.14.256-py2.py3-none-any.whl
| Download URL | yagmail-0.14.256-py2.py3-none-any.whl |
|---|---|
| Size | 15.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
30dc2bc9d84fe56897df34adcd63fadf1d8dc2505d54c3bad9ba101915fabb1b
|
|
BLAKE2b-256 checksum How to use checksums |
07c9f8252868c64eb53256d6f3847f99c902e151325260c4246d09ddd967fb83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.7
|