Fixed #21271 Django's usage of smtplib.SMTP should have a timeout.

Thanks Andre Cruz and Tim Graham for discussions and code review. Thanks edevil for bug report
and initial PR.