Ejemplo n.º 1
0
        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
Ejemplo n.º 2
0
        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
Ejemplo n.º 3
0
        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
Ejemplo n.º 4
0
        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