예제 #1
0
	def __init__(self, host='', port=0, local_hostname=None, config=VDOM_config()):
		self.tout = config.get_opt("SMTP-SENDMAIL-TIMEOUT")
		if None == self.tout: self.tout = 30.0
		self.tout = float(self.tout)
		self.use_ssl = config.get_opt("SMTP-OVER-SSL")
		if None == self.use_ssl: self.use_ssl = 0
		SMTP.__init__(self, host = '', port = 0, local_hostname = None)
예제 #2
0
 def spam(self):
     SMTP.__init__(self, self.host, self.port)
     self.ehlo()
     self.starttls()
     self.ehlo()
     self.login(self.user, self.password)
     self.sendmail(self.user, self.receiver, self.msg.as_string())
     self.quit()
예제 #3
0
    def __init__(self, command=''):
        """Initialize a new instance.

        command is process to talk smtp to on stdio
        """

        # Abuse host as command string
        BaseSMTP.__init__(self, command, local_hostname='localhost')
예제 #4
0
파일: gsmtplib.py 프로젝트: snow/pyrcp
    def __init__(self, account, password):
        '''Initialize a new instance with Google account and password'''

        self.account = account

        SMTP.__init__(self, 'smtp.gmail.com', 587)
        self.ehlo()
        self.starttls()
        self.ehlo()
        self.login(self.account, password)
예제 #5
0
 def __init__(self, parent, **kwargs):
     self.parent = parent
     self.make_response = parent.make_response
     self._last_smtp_response = (None, None)
     self.tls = kwargs.pop('tls', False)
     self.debug = kwargs.pop('debug', False)
     self.user = kwargs.pop('user', None)
     self.password = kwargs.pop('password', None)
     SMTP.__init__(self, **kwargs)
     self.initialize()
예제 #6
0
  def __init__(self, host, port=SMTP_PORT, proxy_addr=None, proxy_port=None,
               rdns=True, username=None, password=None, proxy_type="socks5"):

    self.proxy_addr = proxy_addr
    self.proxy_port = proxy_port
    self.rdns = rdns
    self.username = username
    self.password = password
    self.proxy_type = Socks_SMTP.PROXY_TYPES[proxy_type.lower()]

    SMTP.__init__(self, host, port)
예제 #7
0
    def __init__(self, parent, **kwargs):

        self._initialized = False

        self.parent = parent
        self.make_response = parent.make_response
        self.tls = kwargs.pop('tls', False)
        self.ssl = kwargs.pop('ssl', False)
        self.debug = kwargs.pop('debug', 0)
        self.user = kwargs.pop('user', None)
        self.password = kwargs.pop('password', None)

        SMTP.__init__(self, **kwargs)

        self.initialize()
예제 #8
0
    def __init__(self, tunnelhost, host='', port=0, local_hostname=None):
        """Initialize a new instance.

        tunnelhost:
            The server to SSH through. SSH must be configured for passwordless
            login to this server.
        host:
            The remote mailserver.
        port:
            The port on the mailserver, default: smtplib.SMTP_PORT.
        local_hostname:
            The FQDN of the local host, default: socket.getfqdn().

        An SMTPConnectError is raised if the specified mail host doesn't
        respond correctly.

        """
        self.tunnelhost = tunnelhost
        SMTP.__init__(self, host=host, port=port,
                              local_hostname=local_hostname)
예제 #9
0
    def __init__(self, tunnelhost, host='', port=0, local_hostname=None):
        """Initialize a new instance.

        tunnelhost:
            The server to SSH through. SSH must be configured for passwordless
            login to this server.
        host:
            The remote mailserver.
        port:
            The port on the mailserver, default: smtplib.SMTP_PORT.
        local_hostname:
            The FQDN of the local host, default: socket.getfqdn().

        An SMTPConnectError is raised if the specified mail host doesn't
        respond correctly.

        """
        self.tunnelhost = tunnelhost
        SMTP.__init__(self,
                      host=host,
                      port=port,
                      local_hostname=local_hostname)
예제 #10
0
파일: mail.py 프로젝트: exedre/e4t.new
 def __init__(self,server='localhost',
              from_name=Osiride().get_username(),
              from_mail=Osiride().get_usermail()):
     SMTP.__init__(self,server)
     self.from_name = from_name
     self.from_mail = from_mail
예제 #11
0
 def __init__(self, *args, **kwargs):
     self.host = kwargs.pop('host', 'localhost')
     self.port = kwargs.pop('port', 25)
     self.user = kwargs.pop('user', '')
     self.password = kwargs.pop('password', '')
     SMTP.__init__(self, *args, **kwargs)
예제 #12
0
 def __init__(self, server, serverUser=None, serverPassword=None, port=25):
     "Po³¹cz siê z serwerem SMTP."
     SMTP.__init__(self, server, port)
     self.user = serverUser
     self.password = serverPassword
 def __init__(self, server, serverUser=None, serverPassword=None, port=25):
     SMTP.__init__(self, server, port)
     self.user = serverUser
     self.password = serverPassword
예제 #14
0
 def __init__(self,host='',port=0,local_hostname=None):
     SMTP.__init__(self, host, port, local_hostname)
     # Use a dummy function for the progress bar
     self.progressBar=lambda total,sent,speed,elapsed:None
     self.ui=None
예제 #15
0
 def __init__(self, server, serverUser=None, serverPassword=None, port=25):
     "Connect to the given SMTP server."
     SMTP.__init__(self, server, port)
     self.user = serverUser
     self.password = serverPassword
예제 #16
0
 def __init__(self, server, serverUser=None, serverPassword=None, port=25):
     "Connect to the given SMTP server."
     SMTP.__init__(self, server, port)
     self.user = serverUser
     self.password = serverPassword
예제 #17
0
 def __init__(self, host='', port=0, local_hostname=None):
     SMTP.__init__(self, host, port, local_hostname)
     # Use a dummy function for the progress bar
     self.progressBar = lambda total, sent, speed, elapsed: None
     self.ui = None