Skip to main content

Handles sending emails using SMTP with complex attachments

Project description

Email SMTP

Handles sending emails using SMTP

Install

pip install email-smtp

Requires

email-smtp requires python 3.10 or higher

Using

from em import send, valid

def send_email(to, subject, text, html):

	if valid(to):
		send(to, subject, {
			'text': text,
			'html': html
		})

Options

Name Type Description
attachments str[] | {'body': str, 'filename'}[] A list of attachments to add to the email
bcc str | str[] One or more e-mail addresses to send a blind carbon copy to
cc str | str[] One or more e-mail addresses to send a carbo copy to
from str The e-mail address to show as having sent the e-mail
html str The HTML version of the e-mail to send, this or text must be set
reply-to str The e-mail address to mark as receiving any replies
text str The text version of the e-mail to send, this or html must be set
unsubscribe str The URL to add to the header for the receiver to be able to unsubscribe

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

email_smtp-1.0.2.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

email_smtp-1.0.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file email_smtp-1.0.2.tar.gz.

File metadata

  • Download URL: email_smtp-1.0.2.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for email_smtp-1.0.2.tar.gz
Algorithm Hash digest
SHA256 4b67362fd77584a5902db4a099b5cb95da7de44658aa77de31c18c1e0d73e553
MD5 f9a36615e712a09457f750f1f2c66d22
BLAKE2b-256 c2db857db3abde1932682c99b00ed7dce58d2fc4c8b4fcdd186c3fdb840b3d17

See more details on using hashes here.

File details

Details for the file email_smtp-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: email_smtp-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for email_smtp-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 da20e5243f91a72d0d2edc61bc9540749d2520e0a3d24ee5700d972ea35fea92
MD5 939e293260e9cfca8931cb043c8ab816
BLAKE2b-256 4790ca07ee277650662932cc5d14583b26c741391e6a5ff58747261dec449a78

See more details on using hashes here.

Supported by

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