Mercurial > public > mercurial-scm > hg
comparison mercurial/mail.py @ 43170:a1801ee97840
py3: call SMTP.docmd() with an str
Otherwise, this always returns (502, '5.5.2 Error: command not
recognized').
author | Denis Laxalde <denis@laxalde.org> |
---|---|
date | Thu, 10 Oct 2019 21:05:34 +0200 |
parents | 3941e7063d03 |
children | 54b06bec8914 |
comparison
equal
deleted
inserted
replaced
43169:3941e7063d03 | 43170:a1801ee97840 |
---|---|
50 | 50 |
51 def starttls(self, keyfile=None, certfile=None): | 51 def starttls(self, keyfile=None, certfile=None): |
52 if not self.has_extn("starttls"): | 52 if not self.has_extn("starttls"): |
53 msg = b"STARTTLS extension not supported by server" | 53 msg = b"STARTTLS extension not supported by server" |
54 raise smtplib.SMTPException(msg) | 54 raise smtplib.SMTPException(msg) |
55 (resp, reply) = self.docmd(b"STARTTLS") | 55 (resp, reply) = self.docmd("STARTTLS") |
56 if resp == 220: | 56 if resp == 220: |
57 self.sock = sslutil.wrapsocket( | 57 self.sock = sslutil.wrapsocket( |
58 self.sock, | 58 self.sock, |
59 keyfile, | 59 keyfile, |
60 certfile, | 60 certfile, |