Cannot set Django to work with smtp.gmail.com

前端 未结 5 1674
不知归路
不知归路 2021-01-01 13:05

I\'ve been trying to get django to work with gmail\'s smtp server to send mails but I always get this traceback. Any help will be most appreciated.

----- settings.p

5条回答
  •  甜味超标
    2021-01-01 13:12

    EMAIL_BACKEND = 'django_smtp_ssl.SSLEmailBackend'
    EMAIL_HOST='smtp.gmail.com'
    EMAIL_PORT=465
    EMAIL_HOST_USER = 'youruser'
    EMAIL_HOST_PASSWORD = '*********'
    DEFAULT_EMAIL_FROM = 'youremail@gmail.com'
    

    works fine

提交回复
热议问题