Flask mail system sending mails(individual, bulk) attachments(individual, bulk) fully asynchroniously
Project description
✉️ Flask-Mailing
Flask-Mailing adds SMTP mail sending to your Flask applications
Flask_Mail is dead now. This is the time to migrate a fully asynchronous mailer library to send emails using a Flask-based application. If Flask 2.0 supports the asynchronous view function, then who stops you from using Flask-Mailing ?
The key features are:
- Most of the Apis is very similar to the
Flask-Mail
module. - sending emails to either with Flask or using asyncio module.
- sending files either from form-data or files from the 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
andWhoIsXmlApi
. - Unit tests using Mail.
More information on Getting-Started
📥 Downloads
🚑 Package health score by snyk.io
🔗 Important Links
❤️ Github
📄 Documentation
🐍 PYPI
🔨 Installation
pip install flask-mailing
or install from the 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 go to these wonderful people ([🚧]):
Aniket Sarkar 💬 👀 🚧 |
Joshua Kinslow |
Alexandre Gramfort |
ahmetkurukose |
This project follows the all-contributors specification. Contributions of any kind are welcome!
Before you start please read CONTRIBUTING
📝 LICENSE
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
Built Distribution
Hashes for Flask_Mailing-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0734b3e040182dc8fe0fd82b1faf7b669feed141c0dd88148c742b3d0a482992 |
|
MD5 | 91438b317397070738e2ecf9dfc32d5a |
|
BLAKE2b-256 | 65df2437392aaee04ee8feed1e5d10ac46f5b0465dbbe067ccbd0092da127058 |