Skip to main content

Python Simple Fast Email Sending without External Libs

Project description

Python Simple Email Sender (using Threads)

Python Simple Fast Email Sending Without External Library [Implemented with Multi-Threading]

GitHub Repo: https://github.com/sannjayy/py-simple-email

Installaion

Do the following in your virtualenv:

pip install py-simple-email

Import:

from py_simple_email import Email

Minimal Code Example:

from py_simple_email import Email

# SMTP Configuration:
email = Email( 
    EMAIL_HOST = 'email-smtp.ap-south-1.amazonaws.com', 
    EMAIL_HOST_USER = 'XXXXXXXXXXXXXX', 
    EMAIL_HOST_PASSWORD = 'XXXXXXXXXXXXXXXXXXX', 
    DEFAULT_FROM_EMAIL = 'Sanjay Sikdar <hello@sanjaysikdar.dev>',
    EMAIL_PORT= 587, 
    EMAIL_USE_TLS = True,
)

# Sending Email:
email.send(
    to_email=['hello@sanjaysikdar.dev', 'hello@znassolutions.com'],
    subject='Test Mail',
    msg='Hello from Simple Email.',
)

Sending Fancy Emails:

html = """\
<html>
  <body>
    <p>Hi,<br>
       How are you?<br>
       <a href="http://read.sanjaysikdar.dev">Sanjay Sikdar</a> 
       has many great tutorials.
    </p>
  </body>
</html>
"""

email.send(
    from_email='host@sanjaysikdar.dev',
    to_email='me@sanjaysikdar.dev',
    subject='HTML Test E-email',
    msg=html,
    is_html=True
)


Developed by Sanjay Sikdar.

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

py_simple_email-1.0.1.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file py_simple_email-1.0.1.tar.gz.

File metadata

  • Download URL: py_simple_email-1.0.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for py_simple_email-1.0.1.tar.gz
Algorithm Hash digest
SHA256 addde2749840f309af595c7845231d8459af45e03cad8ffec62a796970fffa4d
MD5 4f0256b7dd1e92cadeb9d90885c5e10f
BLAKE2b-256 bb89d0d67cf3d27c15e907b0f6a26caf3960a7db0c758c5da134d76aea2ad525

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