简体   繁体   中英

Not getting Django error emails

I get this in my maillog when I visit a page with an error.

connect from localhost[127.0.0.1] NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 504 5.5.2 <P>: Recipient address rejected: need fully-qualified address; from=<admin@site.net> to=<P> proto=ESMTP helo=<Web-Mail--Host2.site.net>

Here is the relevant code from my settings.py

DEBUG = False
ADMINS = (
    'Name', 'email@gmail.com',
)


MANAGERS = ADMINS
EMAIL_HOST = "site.net"
SERVER_EMAIL = "admin@site.net"

I have done this before by basically just adding my email to the admin list and adding EMAIL_HOST and SERVER_EMAIL, but it's not working on this server.

Upon further investigation i noticed I had to add brackets in my admin list.

'Name', 'email@gmail.com',

was changed to ('Name', 'email@gmail.com'),

and I got the email.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM