0

I can get my django application to properly report server errors by email using the obvious settings :

DEBUG = False

ADMINS = (('name','email'),)
MANAGERS = (('name','email'),)

EMAIL_HOST = 'ip address'
EMAIL_HOST_USER = 'user'
EMAIL_PORT = 25
EMAIL_HOST_PASSWORD = 'pwd'
SERVER_EMAIL = 'server-email'

Yet for some reason, when I try to use send_email() it returns either Authentication errors if I try without TLS, or "You don't have permission to send as this sender" if I do use TLS. I can't understand why error reporting works, and send_email doesn't... it uses the same settings by default.

Any suggestions ?

M.javid
  • 6,387
  • 3
  • 41
  • 56
Jglstewart
  • 696
  • 1
  • 8
  • 16

1 Answers1

1

There are two settings which affect the 'from' email address for different types of emails.

It looks as if you have already set SERVER_EMAIL, so make sure you have set DEFAULT_FROM_EMAIL as well.

Alasdair
  • 298,606
  • 55
  • 578
  • 516