python - Django mail_admins vs send_mail -
i can django application report server errors email using 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 reason, when try use send_email()
returns either authentication errors if try without tls, or "you don't have permission send sender" if use tls. can't understand why error reporting works, , send_email
doesn't... uses same settings default.
any suggestions ?
there 2 settings affect 'from' email address different types of emails.
server_email
- used sending error emails admins , managers.default_from_email
- used sending regular emails
it looks if have set server_email
, make sure have set default_from_email
well.
Comments
Post a Comment