Skip to main content

Wrappers to sending emails (or testing it) from your Python app

Project description

Although Python makes sending email relatively easy via the smtplib module, this bundle provides a couple of light wrappers over it.

These wrappers are provided to make sending email extra quick, to make it easy to test email sending during development, and to provide support for platforms that can’t use SMTP.

Usage:

from mailshake import EmailMessage, SMTPMailer

email_msg = EmailMessage(
    "Weekend getaway",
    'Here's a photo of us from our Europe trip.',
    'from@example.com',
    ['mary@example.com', 'bob@example.com'],

    )
email_msg.attach("picture.jpg")

mailer = SMTPMailer()
mailer.send(email_msg)

Severals other mailers are available for testing: ToConsoleMailer, ToFileMailer, ToMemoryMailer and DummyMailer (does nothing).

.

© by Lúcuma labs (http://lucumalabs.com). MIT License. (http://www.opensource.org/licenses/mit-license.php)

Extracted from the mail backends of Django (http://djangoproject.com)> The original code was BSD licensed. See LEGAL.md for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

MailShake-0.9.tar.gz (137.7 kB view details)

Uploaded Source

File details

Details for the file MailShake-0.9.tar.gz.

File metadata

  • Download URL: MailShake-0.9.tar.gz
  • Upload date:
  • Size: 137.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for MailShake-0.9.tar.gz
Algorithm Hash digest
SHA256 b2626611e7d748c7627bedc9f0c628c2341d818d2e462f12bf1a4bf560ea1ee4
MD5 49c74d3c7addc920e14d6b0543b10b99
BLAKE2b-256 877951f7611bbec2dbd23943b1cfe6e0c07e701370c33e451b7852dcb111527e

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