Reputation: 728
I have tried what I can think of but can't get the email to be sent from my application using flask-mail with Zoho mail.
I've tried setting up an app password and I have tried the following examples of configuration using some of the information from their site:
https://www.zoho.com/mail/help/pop-access.html
app.config['MAIL_SERVER'] = 'smtp.zoho.com'
app.config['MAIL_PORT'] = 465
app.config['MAIL_USE_SSL'] = True
app.config['MAIL_USERNAME'] = '[email protected]'
app.config['MAIL_PASSWORD'] = 'XXXXXXXXXXXX'
app.config['MAIL_SERVER'] = 'smtp.zoho.com'
app.config['MAIL_PORT'] = 587
app.config['MAIL_USE_TLS'] = True
app.config['MAIL_USERNAME'] = '[email protected]'
app.config['MAIL_PASSWORD'] = 'XXXXXXXXXXX'
I would expect to be able to send an email using flask-mail with my custom domain which is setup with zoho.
Upvotes: 0
Views: 919
Reputation: 21
For secure access head on to general setting on Zoho mail(https://mail.zoho.com/zm/#settings/general)
My account>Security Questions
Application-Specific Passwords > Generate new password
name your app. It'll give you a password
export MAIL_PASSWORD=<generated-password>
then in config.py
import os
MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD')
And when you use TLS Zoho on time of writing this uses the port 587\
Upvotes: 0