summaryrefslogtreecommitdiff
path: root/Lib/smtplib.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-09-18 02:26:39 +0000
committerTim Peters <tim.peters@gmail.com>2001-09-18 02:26:39 +0000
commita685fbf19d1cb8f1a3d17ad33d64c896fb4f3608 (patch)
tree88751a547dfe55657e646bc0386448267edf56ef /Lib/smtplib.py
parentc0f2efcba5d8037e5774de23a1b90406f6d826b5 (diff)
downloadcpython-a685fbf19d1cb8f1a3d17ad33d64c896fb4f3608.tar.gz
Whitespace normalization.
Diffstat (limited to 'Lib/smtplib.py')
-rwxr-xr-xLib/smtplib.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
index 30f93980db..4527a846b9 100755
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -126,7 +126,7 @@ class SMTPAuthenticationError(SMTPResponseException):
class SSLFakeSocket:
"""A fake socket object that really wraps a SSLObject.
-
+
It only supports what is needed in smtplib.
"""
def __init__(self, realsock, sslobj):
@@ -142,7 +142,7 @@ class SSLFakeSocket:
class SSLFakeFile:
"""A fake file like object that really wraps a SSLObject.
-
+
It only supports what is needed in smtplib.
"""
def __init__( self, sslobj):
@@ -524,7 +524,7 @@ class SMTP:
authmethod = method
break
if self.debuglevel > 0: print "AuthMethod:", authmethod
-
+
if authmethod == AUTH_CRAM_MD5:
(code, resp) = self.docmd("AUTH", AUTH_CRAM_MD5)
if code == 503:
@@ -532,7 +532,7 @@ class SMTP:
return (code, resp)
(code, resp) = self.docmd(encode_cram_md5(resp, user, password))
elif authmethod == AUTH_PLAIN:
- (code, resp) = self.docmd("AUTH",
+ (code, resp) = self.docmd("AUTH",
AUTH_PLAIN + " " + encode_plain(user, password))
elif authmethod == None:
raise SMTPError("No suitable authentication method found.")
@@ -544,20 +544,20 @@ class SMTP:
def starttls(self, keyfile = None, certfile = None):
"""Puts the connection to the SMTP server into TLS mode.
-
+
If the server supports TLS, this will encrypt the rest of the SMTP
session. If you provide the keyfile and certfile parameters,
the identity of the SMTP server and client can be checked. This,
however, depends on whether the socket module really checks the
certificates.
"""
- (resp, reply) = self.docmd("STARTTLS")
+ (resp, reply) = self.docmd("STARTTLS")
if resp == 220:
sslobj = socket.ssl(self.sock, keyfile, certfile)
self.sock = SSLFakeSocket(self.sock, sslobj)
self.file = SSLFakeFile(sslobj)
return (resp, reply)
-
+
def sendmail(self, from_addr, to_addrs, msg, mail_options=[],
rcpt_options=[]):
"""This command performs an entire mail transaction.