def _get_socket(self, host, port, timeout): new_socket = self.socket() new_socket.connect((host, port)) if SSL and ssl is not None: new_socket = ssl.wrap_socket(new_socket, self.keyfile, self.certfile) self.file = smtplib.SSLFakeFile(new_socket) return new_socket
def _get_socket(self, host, port, timeout): print('Creating socket -> %s:%s/%s using %s, SSL=%s') % ( host, port, timeout, self.socket, SSL) new_socket = self.socket() new_socket.connect((host, port)) if SSL and ssl is not None: new_socket = ssl.wrap_socket(new_socket, self.keyfile, self.certfile) self.file = smtplib.SSLFakeFile(new_socket) return new_socket
def _get_socket(self, host, port, timeout): print ('Creating socket -> %s:%s/%s using %s, SSL=%s' ) % (host, port, timeout, self.socket, SSL) new_socket = self.socket() new_socket.connect((host, port)) if SSL and ssl is not None: new_socket = ssl.wrap_socket(new_socket, self.keyfile, self.certfile) self.file = smtplib.SSLFakeFile(new_socket) return new_socket