Skip to main content

A module that simplifies sending email.

Project description

Here are some of the features:

  • Single class to send plain text, HTML email, and attachments

  • Auto detects attachment types

  • Support for internationalized headers

Examples

Sending an HTML email:

from mailer import Mailer
from mailer import Message

message = Message(From="me@example.com",
                  To="you@example.com",
                  charset="utf-8")
message.Subject = "An HTML Email"
message.Html = """This email uses <strong>HTML</strong>!"""
message.Body = """This is alternate text."""

sender = Mailer('smtp.example.com')
sender.send(message)

Sending an attachment:

from mailer import Mailer
from mailer import Message

message = Message(From="me@example.com",
                  To="you@example.com",
                  Subject="Cute Cat")
message.Body = """Kittens with dynamite"""
message.attach("kitty.jpg")

sender = Mailer('smtp.example.com')
sender.send(message)

Tested with Python 2.4 and 2.5

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

mailer-0.2.zip (3.0 kB view details)

Uploaded Source

Built Distribution

mailer-0.2.win32.exe (64.6 kB view details)

Uploaded Source

File details

Details for the file mailer-0.2.zip.

File metadata

  • Download URL: mailer-0.2.zip
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mailer-0.2.zip
Algorithm Hash digest
SHA256 e9cd06c03928222abc24c0551a4dfa93d5df9f5c58ef1b5b0d9b6214e764462a
MD5 e481c44cc66c212b13ddc273c799284a
BLAKE2b-256 1ae0e4e1d1bca60fcf7ab73abc67fe4bdb8237024ef8f4a5ccf075fb9b7f3a54

See more details on using hashes here.

File details

Details for the file mailer-0.2.win32.exe.

File metadata

  • Download URL: mailer-0.2.win32.exe
  • Upload date:
  • Size: 64.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mailer-0.2.win32.exe
Algorithm Hash digest
SHA256 4e41f0ec829e84bcde258e50c295d35a51432eef7242f3e80406520302707164
MD5 2e8d957d740f49084f601c4019ce9711
BLAKE2b-256 b1de863d238c6f3510bfc824bf823e93a93daeb577acbadc07760575fe4bbec2

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 Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page