Does anyone had success getting Django to send emails when hosting on Dreamhost?

后端 未结 5 1839
无人共我
无人共我 2021-02-04 17:53

Greetings,

Does anyone know what are the required fields to have Django send emails when a \"500 Internal Server Error\" happend? I am hosting my project on Dreamhost an

5条回答
  •  甜味超标
    2021-02-04 18:13

    As proposed by S.Mark, you can use gmail. Here is what you need in your settings.py

    ADMINS = (
        ('Your Name', 'your_name@email.com'),
    )
    
    EMAIL_HOST = 'smtp.gmail.com'
    EMAIL_PORT = 587
    EMAIL_HOST_PASSWORD = 'password'
    EMAIL_HOST_USER = 'gmail_account'
    EMAIL_SUBJECT_PREFIX = 'something'
    EMAIL_USE_TLS = True
    

提交回复
热议问题