Skip to content

Web app for sending mail based on timestamp given build with flask

Notifications You must be signed in to change notification settings

irhamdz/flask-send-mail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flask-send-mail

Web app for sending mail based on timestamp given build with flask

Development

  • Create and activate new Python virtual environment
python3 -m venv env
source env/bin/activate
  • Install dependencies
pip install -r requirements.txt
  • Set env variables for local machine
export FLASK_APP=flask_send_mail
export FLASK_ENV=development
  • Initialize database
flask init-db
  • Run app
flask run
  • Testing
# make sure you install the application first
pip install -e .

# if db not found
flask init-db

# run tests
pytest

Using Scheduler

  • install rabbitMQ on your local machine

for detail step of installation, you can go to this link

  • create your mailtrap account

sign up or create through this link

  • set env for mailtrap user and pass
export MAIL_USERNAME='your-mailtrap-username'
export MAIL_PASSWORD='your-mailtrap-password'
  • run celery command
celery -A flask_send_mail.tasks.celery worker -l info -B

API SPEC

please go to this link to see the api spec for available endpoints.

About

Web app for sending mail based on timestamp given build with flask

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published