Skip to main content

Basic implementaion of SMTP client using TCP communication with the SMTP server using the `socket` module.

Project description

Sandesh - Send Mail 🕊️

Basic implementaion of SMTP client using TCP communication with the SMTP server using the socket module.

Installation

pip install sandesh.py

Usage

from sandesh_py import smtp

auth: smtp.SMTPAuth = {
    "username": YOUR_SMTP_USERNAME,
    "password": YOUR_SMTP_PASSWORD,
}
options: smtp.SMTPOptions = {"notls": False}
client = smtp.SMTPClient(SMTP_SERVER_HOST, SMTP_PORT, auth, options)

client.connect()
mail = smtp.Mail(
    {
        "mailTo": "receiver@email.com",
        "mailFrom": "sender@email.com",
        "subject": "Mail subject",
        "body": "This is demonstartaion of use of sandesh_py package",
        "attachment": [
            "/path/to/attachment/1",
            "/path/to/attachment/2",
        ],
    }
)
print(client.sendMail(mail))
client.close()

ToDo List

  • Add support for MIME to handle attachments and alternative content types
  • Support Oath and API authentication
  • Connection Pooling and Asynchronous Delivery

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

sandesh.py-0.0.2.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

sandesh.py-0.0.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file sandesh.py-0.0.2.tar.gz.

File metadata

  • Download URL: sandesh.py-0.0.2.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for sandesh.py-0.0.2.tar.gz
Algorithm Hash digest
SHA256 aa04ea26586fce75037ecf78fbaa559016d504d78668c5713cf4188c1e2a5e15
MD5 91822581486aa0a3042267d5770c88ab
BLAKE2b-256 71a18b25dd17f503be223dcb920bfaa99244dbc5106f3b3e6c55321b144a38b5

See more details on using hashes here.

File details

Details for the file sandesh.py-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: sandesh.py-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for sandesh.py-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1aa74c730f4dd22639a8a485ddf1bf21ef8ccdf557649fe1c8cf13a2e7499311
MD5 fe403331d76da1b40221edfb1cef0f42
BLAKE2b-256 eb68ddbc445baa8292a03ad2fc3cab16981f4b821228a8ba482bbc16c4777864

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