Skip to content
This repository has been archived by the owner on Jun 23, 2020. It is now read-only.
/ mail-usv Public archive

Python Microservice for Email Sending

License

Notifications You must be signed in to change notification settings

ractf/mail-usv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Email Sending Microservice

Yay it's a microservice for sending emails. That's literally it.

To send mail, POST /send with params to (the recipient), subject (...), template (the template to use), and any other additional params needed by the template.

For each speficied template there must be [name].txt and [name].html in /templates, both of which will be rendered using the Jinja2 rendering engine.

In order to send mail, config.py must be created, and example of which is shown below:

FROM_NAME = "Funny Email Co."
EMAIL = "[email protected]"
LOGIN = (EMAIL, "hunter2")

SMTP = ("smtp.example.com", 587)
MODE = 'STARTTLS'

Note: MODE may be either STARTTLS or SSL.