Skip to main content

Description

High-level interface for sending email through googlemail.

Usage

Create conf.py and fill in your email and password credentials. Ex:

email = 'your.email@gmail.com'
password = 'your.pass'   

Create googlemail object:

gmail = Gmail(email, password)

Start the server and login

gmail.start_server()
gmail.login()

Create a simple template dictionary with the email header and body

mail_template = {
    'from': 'fromsender@gmail.com',
    'to': 'tosender@gmail.com',
    'subject':  'Cool subject email',
    'body': """
    HTML template or the like
    """
}

Send the message

gmail.send_msg(mail_template)

Testing

To run the tests you need to configure the sender username, password, and recipient email

$ export GOOGLEMAIL_EMAIL=<YOUR SENDER EMAIL>
$ export GOOGLEMAIL_PASSWORD=<YOUR SENDER PASSWORD>

$ export GOOGLEMAIL_TESTEMAIL=<YOUR TEST RECIPIENT EMAIL>

Metadata

Release files for googlemail 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for googlemail 0.1.0
File Size Uploaded
googlemail-0.1.0.tar.gz 3.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for googlemail 0.1.0
File Interpreter ABI Platform
googlemail-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.8 kB

Release files / googlemail-0.1.0.tar.gz

Download URL googlemail-0.1.0.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
05a7deb27b54f477fdc4fd8ba18703e38f5f7f6d153f441e481acec525401bd4
BLAKE2b-256 checksum
How to use checksums
58186328a9101bbb1c86565a467ab50935c47bd9891fdfd25e249f201a9c6ec5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

Release files / googlemail-0.1.0-py3-none-any.whl

Download URL googlemail-0.1.0-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
60f9361560c50225dee3d29276131da4f57b69134467cc8bcdf3bc391ba3b074
BLAKE2b-256 checksum
How to use checksums
ee56bee5c366845466955b866ee56f1079ffd0b0b387d9c8c04e407f096b8ec6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page