Skip to main content

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/.

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.15.293.tar.gz (69.8 kB view details)

Uploaded Source

Built Distribution

yagmail-0.15.293-py2.py3-none-any.whl (17.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file yagmail-0.15.293.tar.gz.

File metadata

  • Download URL: yagmail-0.15.293.tar.gz
  • Upload date:
  • Size: 69.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for yagmail-0.15.293.tar.gz
Algorithm Hash digest
SHA256 44e8d0cda4f63e22a14902cc9096d52197fd0ced023d50b0409325f401585296
MD5 79942d0c69ae86c7d1f8fe6e9a018d57
BLAKE2b-256 4b4c4853d3bc34cf68d2a4048e5d82ad7300692edcfe9711013f1f2ce368f188

See more details on using hashes here.

File details

Details for the file yagmail-0.15.293-py2.py3-none-any.whl.

File metadata

  • Download URL: yagmail-0.15.293-py2.py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for yagmail-0.15.293-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 947a0864e4a64452c8e6b58c80b5bf45389bf8842d779701febfd34fa09649c7
MD5 bc8d2546f1d13a1ce2e272e09ab8dd15
BLAKE2b-256 0b7bf9758da947300b09dedfb08f228fea2f8e09b6d611918ba573ee13744516

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page