Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

billowdev/flask-api-aco-shortest-path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pip install -r requirement.txt

send mail SMTP, SendGrid, or Amazon SES

for use Amazon SES
  • To use flask_mail with Amazon SES, you will need to configure your application to use the Amazon SES SMTP interface. Here's how you can do it
pip install boto3
MAIL_SERVER = 'email-smtp.us-east-1.amazonaws.com'
MAIL_PORT = 587
MAIL_USE_TLS = True
MAIL_USERNAME = 'your_ses_smtp_username'
MAIL_PASSWORD = 'your_ses_smtp_password'
MAIL_DEFAULT_SENDER = 'your_default_sender_email_address'
for SendGrid

Create a SendGrid account and obtain an API key. You can sign up for a free account at https://sendgrid.com/free/.

pip install sendgrid
MAIL_SERVER = 'smtp.sendgrid.net'
MAIL_PORT = 587
MAIL_USE_TLS = True
MAIL_USERNAME = 'apikey'
MAIL_PASSWORD = 'your_sendgrid_api_key'
MAIL_DEFAULT_SENDER = 'your_default_sender_email_address'
from flask_mail import Message

message = Message(subject='Hello from Flask-Mail',
                  recipients=['recipient@example.com'])
message.body = 'This is a test email sent from Flask-Mail using SendGrid.'
mail.send(message)

fronend

nextjs-leaflet-navigation