Django - [Errno 111] Connection refused

前端 未结 8 1481
感情败类
感情败类 2020-11-29 21:29

when I post a comment, do not save, crashes (error: [Errno 111] Connection refused), why?

views.py

import time
from calendar import month_name

from          


        
8条回答
  •  北海茫月
    2020-11-29 22:19

    additionally the following will help:

    put the following minimal settings in the settings.py or local_settings.py file on your server.

    EMAIL_HOST = 'localhost'
    EMAIL_PORT = 587
    EMAIL_USE_TLS = True
    

    instead of using smtp.gmail.com which imposes lot many limitations, you can have your own mail server.

    you can do it by installing your own mailserver:

    sudo apt-get install sendmail
    

提交回复
热议问题