Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Python Simple Email Sending without External Library
https://github.com/sannjayy/py-simple-email

pypi-package python

Last synced: 30 days ago
JSON representation

Python Simple Email Sending without External Library

Awesome Lists containing this project

README

        

## 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](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:**
```python
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 ',
EMAIL_PORT= 587,
EMAIL_USE_TLS = True,
)

# Sending Email:
email.send(
to_email=['[email protected]', '[email protected]'],
subject='Test Mail',
msg='Hello from Simple Email.',
)
```

---

**Sending Fancy Emails:**

```python

html = """\


Hi,

How are you?

Sanjay Sikdar
has many great tutorials.


"""

email.send(
from_email='[email protected]',
to_email='[email protected]',
subject='HTML Test E-email',
msg=html,
is_html=True
)

```

---

[![](https://img.shields.io/github/followers/sannjayy?style=social)](https://github.com/sannjayy)
Developed by *Sanjay Sikdar*.
- 📫 [email protected]