sending mail fails when EMAIL_HOST is an empty string
|Reported by:||tinodb||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I changed EMAIL_HOST from a hostname to an empty string, expecting it to use localhost. A misleading error was thrown: SMTPServerDisconnected: please run connect() first. This is because the empty string is passed down to smtplib.SMTP, which doesn't connect on init when the given host evaluates to False.
I don't know what the best solution would be, maybe a note in the docs would be enough? Or should the django SMTP backend change an empty host to 'localhost'?