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 hashes)
Built Distribution
Dmail-0.1.2-py3-none-any.whl
(16.2 kB
view hashes)