Skip to main content

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 )

Steins;Gate

Installation

A simple pip install will do :

python -m pip install Dmail

Demo

import os
from Dmail import Gmail

# 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**
"""

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


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.0.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

Dmail-0.1.0-py3-none-any.whl (15.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page