O'Reilly logo
  • Shawn Zhai thinks this is interesting:

app.config['MAIL_SERVER'] = 'smtp.googlemail.com'

From

Cover of Flask Web Development

Note

refer to https://support.google.com/mail/answer/7126229?p=BadCredentials&visit_id=0-636307624105622281-3823564273&rd=2

should be set to 'smtp.gmail.com'