This is a simple package that provides a quick way to send emails through code.
Project description
Dmail
This is a simple package that provides a simple way to send emails through code.
It has the possibility to send markdown content ( that is converted to html )
Installation
A simple pip install will do :
python -m pip install Dmail
Demo
import os
from Dmail import Gmail, Hotmail
# email info
receiver_email = "xxx@gmail.com"
sender_email = os.environ.get('mail')
password = os.environ.get('pass')
message = """
Email Content
"""
with Gmail(sender_email, password) as gmail:
gmail.send_message(message, receiver_email, "Subject")
# Send Markdown e-mails :
message = """
# Email Content
This is a **test**
![test image](tests/another_image.png)
this is some other text
"""
with Gmail(sender_email, password) as gmail:
gmail.add_attachment(r"tests\test_image.jpg", "another_name.jpg")
gmail.send_message(message, receiver_email, "Subject", subtype='md')
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
Dmail-0.1.2.tar.gz
(2.9 kB
view details)
Built Distribution
Dmail-0.1.2-py3-none-any.whl
(16.2 kB
view details)
File details
Details for the file Dmail-0.1.2.tar.gz
.
File metadata
- Download URL: Dmail-0.1.2.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a949298a4c10b71c15ac134d06e856dd60fc1ed5c2a9b3a918e09e2dc3c6cd3 |
|
MD5 | 8f04a0b29491cba5cfd6250916792978 |
|
BLAKE2b-256 | c576b20a5534d656c2cc8c45fde07f3fa5f6bdda583da638411cb8702dfa842f |
File details
Details for the file Dmail-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: Dmail-0.1.2-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf744941b74d6f557940679eaff3c294a6fac3681e0d19b10a1a692c279b8307 |
|
MD5 | c74af92faef0f158f731ba251fcbd0e8 |
|
BLAKE2b-256 | 3985478100aef3d718f836203f278caf3673aed9297b8d8a8e947472498b9dd9 |