Pregunta

Greetings fellow djangonauts
My Django app is working nicely on dreamhost.
When I use gmail, both code error notifications and send_mail() from within my views work fine.
When I use my dreamhost email and settings, I am able to use send_mail() from my views but I no longer receive code error notifications.
I checked with dreamhost, they said my email settings were correct and that it must be an app issue. Are there any additional settings I'm missing? Any help would be highly appreciated.

Here are my settings :

#settings.py 

#GMAIL SETTINGS:  works great 
EMAIL_HOST = 'smtp.gmail.com' 
EMAIL_PORT = 587 
EMAIL_HOST_PASSWORD = 'PASSWORD' 
EMAIL_HOST_USER = 'my_username' 
EMAIL_SUBJECT_PREFIX = '' 
EMAIL_USE_TLS = True 

#DREAMHOST SETTINGS:
EMAIL_HOST = 'mail.my_site.com'  #also tried 'localhost' 
EMAIL_PORT = 587  #also tried 25
EMAIL_HOST_PASSWORD = 'PASSWORD' 
EMAIL_HOST_USER = 'admin@my_site.com' 
EMAIL_SUBJECT_PREFIX = '' 
EMAIL_USE_TLS = True  #i tried with and without TLS, it does not work. 

Thanks,

¿Fue útil?

Solución

By "code error notifications", I'm assuming you mean the emails you get when there's a 500 exception.

Three settings control this feature.

  1. SERVER_EMAIL – who the email is shown as coming "from". Some SMTP servers will reject any email not coming from a known account. Try setting this to your Dreamhost accounts's email address.

  2. ADMINS – a tuple containing of list of who to email when problems occur. Make sure this is set up with your email account listed:

    ADMINS = (('Jack Shedd', 'jack@example.com'),)
    
  3. DEBUG - Must be set to False

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top