Esempio n. 1
0
 def __init__ (self, username, password):
     self.imap_server = imaplib.IMAP4_SSL("imap.gmail.com",993)
     self.username = username
     self.password = password
     self.loggedIn = False
     self.mailboxes = gmail_mailboxes.gmail_mailboxes(self)
     self.messages = gmail_messages.gmail_messages(self)
Esempio n. 2
0
 def __init__ (self, host, key):
     self.imap_server = imaplib.IMAP4_SSL(host)
     self.key = key
     self.username = "[email protected]"
     self.loggedIn = False
     
     self.mailboxes = gmail_mailboxes.gmail_mailboxes(self)
     self.messages = gmail_messages.gmail_messages(self)
    def __init__ (self, email, oauth_token, oauth_token_secret):
        self.url = BASE_URL % email
        self.token = oauth.Token(oauth_token, oauth_token_secret)

        self.consumer = oauth.Consumer(settings.OAUTH_CONSUMER_KEY,
                                       settings.OAUTH_CONSUMER_SECRET
                                       )
        self.imap_server = imaplib.IMAP4_SSL("imap.gmail.com")
        self.loggedIn = False
        
        self.mailboxes = gmail_mailboxes.gmail_mailboxes(self)
        self.messages = gmail_messages.gmail_messages(self)