Giter Club home page Giter Club logo

flask-mailing's Introduction

✉️ 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 similar to 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

🚑 Package health score by snyk.io

Flask-Mailing

🔗 Important Links

❤️ Github

🐍 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'] = "[email protected]"

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=["[email protected]"],  # 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

flask-mailing's People

Contributors

agramfort avatar imgbotapp avatar marktennyson avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.