Skip to main content

Simple SMTP wrapper for Python's SMTP, supports both HTML and text based emails. Now supports attachments!

Project description

Simple SMTP wrapper for Python with basic HTML and text support based on MIME types.


Install simpleemail

pip install simpleemail

Then use it in a project:

from simpleemail import create_email_message, send_email

To send an email you have to first create an email message to send. Note you can use any combination of plain text or HTML when creating a message.

message = create_email_message('Hello','','','World!','<html><head></head><body><h1>World!</h1></body></html>') send_email(message,'', False)

You can also provide parameters to be replaced when the message is created.:

params = {'name': 'Rick James'}
message = create_email_message('Hello',

This will substitute the value of Rick James in for the name.

You can also send a single attachment or multiple attachments by choosing:

message = create_email_message('Hello',
                                'Test body',
                                '<html><head></head><body><h1>Test body</h1></body></html>',

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

simpleemail-0.4.tar.gz (3.4 kB view hashes)

Uploaded source

Built Distribution

simpleemail-0.4-py3-none-any.whl (4.5 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page