Skip to main content

Flask mail system sending mails(individual, bulk) attachments(individual, bulk) fully asynchroniously

Project description

✉️ Flask-Mailing

Flask mail logo

Flask-Mailing adds SMTP mail sending to your Flask applications

Flask_Mail is dead now. This is the time to migrate a fully asynchronous based mailer library to send emails while using a Flask based application. Now Flask 2.0 supports the asynchronous view function then who is stopping you to use Flask-Mailing ?

The key features are:

  • Most of the Apis are very familiar with Flask-Mail module.
  • sending emails with either with Flask or using asyncio module
  • sending files either from form-data or files from server
  • Using Jinja2 HTML Templates
  • email utils (utility allows you to check temporary email addresses, you can block any email or domain)
  • email utils has two available classes DefaultChecker and WhoIsXmlApi
  • Unittests using Mail

More information on Getting-Started

📥 Downloads

Downloads Downloads Downloads

🔗 Important Links

❤️ Github

📄 Documentation

🐍 PYPI

🔨 Installation

 pip install flask-mailing

or install from source code

git clone https://github.com/marktennyson/flask-mailing.git && cd flask-mailing
python -m pip install .

🦮 Guide

from flask import Flask, jsonify
from flask_mailing import Mail, Message

app = Flask(__name__)

app.config['MAIL_USERNAME'] = "YourUserName"
app.config['MAIL_PASSWORD'] = "strong_password"
app.config['MAIL_PORT'] = 587
app.config['MAIL_SERVER'] = "your mail server"
app.config['MAIL_USE_TLS'] = True
app.config['MAIL_USE_SSL'] = False
app.config['USE_CREDENTIALS'] = True
app.config['VALIDATE_CERTS'] = True
app.config['MAIL_DEFAULT_SENDER'] = "youremailid@doaminname.com"

mail = Mail(app)

html = """
<p>Thanks for using Flask-Mailing</p> 
"""


@app.post("/email")
async def simple_send():

    message = Message(
        subject="Flask-Mailing module",
        recipients=["recipients@email-domain.com"],  # List of recipients, as many as you can pass 
        body=html,
        subtype="html"
        )

    await mail.send_message(message)
    return jsonify(status_code=200, content={"message": "email has been sent"})     

🪜 List of Examples

For more examples of using flask-mailing please check example section

👍 Contributing

Feel free to open issues and send pull requests.

😀 Contributors ✨

Thanks goes to these wonderful people ([🚧]):



Aniket Sarkar

💬 👀 🚧

Joshua Kinslow


Alexandre Gramfort

This project follows the all-contributors specification. Contributions of any kind are welcome!

Before you start please read CONTRIBUTING

📝 LICENSE

MIT

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

Flask-Mailing-0.1.0.tar.gz (14.1 kB view details)

Uploaded Source

Built Distributions

Flask_Mailing-0.1.0-py3.10.egg (36.2 kB view details)

Uploaded Source

Flask_Mailing-0.1.0-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file Flask-Mailing-0.1.0.tar.gz.

File metadata

  • Download URL: Flask-Mailing-0.1.0.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for Flask-Mailing-0.1.0.tar.gz
Algorithm Hash digest
SHA256 822650d9d33810c195a3aa41703e64ef3048b09e009e5e3f66b6755eaad720e5
MD5 29ca792de110c4f88d619e6fbd566f45
BLAKE2b-256 b0630279f3ada5e4bcb524a929cceae585bb577601b06f2933a28084966a238b

See more details on using hashes here.

File details

Details for the file Flask_Mailing-0.1.0-py3.10.egg.

File metadata

  • Download URL: Flask_Mailing-0.1.0-py3.10.egg
  • Upload date:
  • Size: 36.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for Flask_Mailing-0.1.0-py3.10.egg
Algorithm Hash digest
SHA256 686034b5eaa9b84e61af98f1120b69820928e71da58663b467e1fac1a39dd435
MD5 c92689610842d960f38cd6bac0b9ff9d
BLAKE2b-256 fee4e4101f1e096c104476aa2abeb761aeba3cfc590ef50b4c06cce5bbd6ec83

See more details on using hashes here.

File details

Details for the file Flask_Mailing-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: Flask_Mailing-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for Flask_Mailing-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29714bd2285ead3c6a26c36a533dcfac37c332f197598d8362fc6ca56b566748
MD5 b9f13067f08cd6df6899eb4326793e9d
BLAKE2b-256 8a9dfb1af28f2983f112624681dfad81928db414ab9380e7b567ec6ccd125b08

See more details on using hashes here.

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