Hi Xin,

Maybe the server from which you are running the project can’t send emails.
I would try to send an email using the send_mail function from the shell:

$ python manage.py shell
>>> from django.core.mail import send_mail
>>> send_mail(’the subject’, ’the message’, ‘[email protected]’, 
>>> [’[email protected]’,])

It shouldn’t take more than a couple of seconds. If the session hangs I would 
look at the email settings (EMAIL_HOST, EMAIL_PORT, EMAIL_HOST_USER, and 
EMAIL_HOST_PASSWORD), maybe a sysadmin could tell you which values you must use 
to reach the network outside of your local network. Also the EMAIL_BACKEND must 
be django.core.mail.backends.smtp.EmailBackend.

If the function returns 1, then you were able to contact the SMTP server and 
deliver the message successfully to the server. However a misconfiguration in 
the SMTP Server might stop the outgoing message from reaching the mail server 
of your email address.

Give it a try and let us know.

 

> On 19 Sep 2015, at 14:27, Xin Ji <[email protected]> wrote:
> 
> No, I haven't.
> How should I override? And Which file should I put the LOGGING settings in?
> 
> 在 2015年9月19日星期六 UTC+8下午7:49:56,Xin Ji写道:
> I'm using apache + django + mod_wsgi to serve my app.
> My apache version is 2.4.7 and my django version is 1.8.4
> 
> My django settings are:
>   DEBUG=False
> 
>   ADMINS = [
>       ('username','[email protected] 
> <mailto:[email protected]>'),
>   ]
> 
>   MANAGERS = [
>       ('username','[email protected] 
> <mailto:[email protected]>'),
>   ]
> 
>   MIDDLEWARE_CLASSES = (
>       ...
>       'django.middleware.common.BrokenLinkEmailsMiddleware',
>   )
> 
>   EMAIL_HOST = 'stmp.comp.nus.edu.sg <http://stmp.comp.nus.edu.sg/>'
>   EMAIL_PORT = 25
>   EMAIL_HOST_USER = 'username'
>   EMAIL_HOST_PASSWORD = 'password'
> 
> When I ran the server, I got this error on the website(This page uses the 
> django 500.html template.):
> Server Error (500)
> 
> There's been an error. It's been reported to the site administrators via 
> email and should be fixed shortly. Thanks for your patience.
> 
> 
> But I didn't receive any email about the error report.
> 
> What's wrong with my configurations?
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/django-users 
> <http://groups.google.com/group/django-users>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/68c1b621-1cb5-4dfd-bd22-921134a0d128%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/django-users/68c1b621-1cb5-4dfd-bd22-921134a0d128%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8539430C-0EAC-462D-9B97-98CA9EFEC6EA%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to