Ticket #3560: secure-mail.patch
File secure-mail.patch, 773 bytes (added by , 18 years ago) |
---|
-
django/core/mail.py
50 50 """ 51 51 try: 52 52 server = smtplib.SMTP(settings.EMAIL_HOST, settings.EMAIL_PORT) 53 try: 54 if settings.EMAIL_SECURE_SMTP: 55 server.ehlo() 56 server.starttls() 57 server.ehlo() 58 except AttributeError: 59 pass 53 60 if auth_user and auth_password: 54 61 server.login(auth_user, auth_password) 55 62 except: … … 79 86 raise 80 87 try: 81 88 server.quit() 89 except socket.sslerror: 90 pass 82 91 except: 83 92 if fail_silently: 84 93 return