Mail Sender Module that helps you send your emails perfectly.
Project description
Mail Sender Module
Table of Contents
About The Module
Mail Sender Module is a python module that helps you send your emails perfectly.
it also supports send mails with attachments.
Getting Started
How To Install
- using python pip
pip install python-mail-sender
How To Use
Just do the following steps:
- define
SENDER_ADDR&SENDER_PASS&SMTP_PORT&SMTP_SERVERenv variables- Using python:
import os os.environ["SENDER_ADDR"] = "sender_address" os.environ["SENDER_PASS"] = "sender_pass" os.environ["SMTP_PORT"] = "smtp_port" os.environ["SMTP_SERVER"] = "smtp_server"
- Or using the os terminal.
- Or using the venv activate file:
- depending on the os open the corresponding activate file
- on windows
activate.batset SENDER_ADDR=sender_address set SENDER_PASS=sender_pass set SMTP_PORT=smtp_port set SMTP_SERVER=smtp_server
- on non-windows
activate.shexport SENDER_ADDR=sender_address export SENDER_PASS=sender_pass export SMTP_PORT=smtp_port export SMTP_SERVER=smtp_server
- Using python:
- initialize an instance from the
MailSenderclassfrom mail_sender import MailSender mail_sender = MailSender()
- call the
send_mailmethod and provide the mail attributes:Receiver Address Subject Email Content attached files ( optional)noreply@gmail.com any subject content message attached file list mail_sender.send_mail( receiver_address = "test@gmail.com", subject = "email subject", content = "message content", attach_files = (("filename.ext", file),) )
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_mail_sender-0.1.4.tar.gz.
File metadata
- Download URL: python_mail_sender-0.1.4.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1c39cca4aaa2fa16cdb2a0c8af13532668c96a692c6f4ec80ca378a8579a7f5
|
|
| MD5 |
5bfbff9561354256623b1206d28efecd
|
|
| BLAKE2b-256 |
0f9435312e0ec4419a8742efa26ade229f221af9b94787a9d58aee655321a8ff
|
File details
Details for the file python_mail_sender-0.1.4-py3-none-any.whl.
File metadata
- Download URL: python_mail_sender-0.1.4-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60cf154721e2a9c99e3e3750a61631894e92e139a11f5ca4a03201017cb52563
|
|
| MD5 |
64c8158bb5a95c216bb70f88d72bbe73
|
|
| BLAKE2b-256 |
9e1219821afc6d10404a26cf41d92a9b351c9ad120ceb0f3cf98436cce0654a1
|