SENDGRID_API_KEY = os.getenv('SENDGRID_API_KEY') # environment variable EMAIL_HOST = 'smtp.sendgrid.net' EMAIL_HOST_USER = 'apikey' # value of your apikey EMAIL_HOST_PASSWORD = SENDGRID_API_KEY EMAIL_PORT = 587 EMAIL_USE_TLS = True