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

>>> msg = Message('test subject', sender='you@example.com', ... recipients=['you@example.com']) >>> msg.body = 'text body' >>> msg

From

Cover of Flask Web Development

Note

if enable 2 factors authentication, we should create a app password for doing this to by pass Key authentication, https://myaccount.google.com/security 页面创建应用专用密码