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
Release history Release notifications | RSS feed
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 hashes)
Built Distribution
Close
Hashes for sandesh.py-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1aa74c730f4dd22639a8a485ddf1bf21ef8ccdf557649fe1c8cf13a2e7499311 |
|
MD5 | fe403331d76da1b40221edfb1cef0f42 |
|
BLAKE2b-256 | eb68ddbc445baa8292a03ad2fc3cab16981f4b821228a8ba482bbc16c4777864 |