Django not sending emails to admins

后端 未结 20 1118
梦如初夏
梦如初夏 2020-12-08 08:54

According to the documentation, if DEBUG is set to False and something is provided under the ADMINS setting, Django will send an email

20条回答
  •  独厮守ぢ
    2020-12-08 09:34

    Try this

    # ./manage shell
    >>> from django.core.mail import send_mail
    >>> send_mail('Subject here', 'Here is the message.', 'from@example.com',['to@example.com'], fail_silently=False)
    

    With a to@example.com that you actually get email at.

提交回复
热议问题