Django - [Errno 111] Connection refused

前端 未结 8 1499
感情败类
感情败类 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:20

    For Development and Testing:

    In Django 1.6+ we can just add this line in settings.py

    EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
    

    This will display the mail on the console for Easy Verification.

    Note: Mail will not be sent to the specified recipient in Msg.Its just for Development and Testing.

    For that you need to configure SMTP server which is given in the Doc.

    For Reference: Django Documentation for Sending Email

提交回复
热议问题