Ejemplo n.º 1
0
    def handleEmailNotifications(self, lastDate):
        """Places new Gmail notifications in the Notifier's queue."""
        emails = Gmail.fetchUnreadEmails(self.profile, since=lastDate)
        if emails:
            lastDate = Gmail.getMostRecentDate(emails)

        def styleEmail(e):
            return "New email from %s." % Gmail.getSender(e)

        for e in emails:
            self.q.put(styleEmail(e))

        return lastDate
Ejemplo n.º 2
0
    def handleEmailNotifications(self, lastDate):
        """Places new Gmail notifications in the Notifier's queue."""
        emails = Gmail.fetchUnreadEmails(self.profile, since=lastDate)
        if emails:
            lastDate = Gmail.getMostRecentDate(emails)

        def styleEmail(e):
            return "New email from %s." % Gmail.getSender(e)

        for e in emails:
            self.q.put(styleEmail(e))

        return lastDate
Ejemplo n.º 3
0
    def handle_email_notifications(self, last_date):
        """Places new Gmail notifications in the Notifier's queue."""
        emails = Gmail.fetch_unread_emails(self.profile, since=last_date)
        if emails:
            last_date = Gmail.get_most_recent_date(emails)

        def style_email(e):
            return "New email from %s." % Gmail.get_sender(e)

        for e in emails:
            self.q.put(style_email(e))

        return last_date
Ejemplo n.º 4
0
    def handleEmailNotifications(self, lastDate):
        """Places new Gmail notifications in the Notifier's queue.
	We place a limit of 50 unread emails at a time """

        emails = Gmail.fetchUnreadEmails(self.profile, since=lastDate)
        #	print(emails)
        print("inside the email notification routine")
        if emails:
            lastDate = Gmail.getMostRecentDate(emails)

        def styleEmail(e):
            return "New email from %s." % Gmail.getSender(e)

        for e in emails:
            self.q.put(styleEmail(e))
        return lastDate
Ejemplo n.º 5
0
    def handleEmailNotifications(self, lastDate):
        
        emails = Gmail.fetchUnreadEmails(self.profile, since=lastDate, markRead=True)
        if emails:
            lastDate = Gmail.getMostRecentDate(emails)

        def styleEmail(e):
            nome = Gmail.getSender(e)
            if string.find(nome,"Google Calendar") != -1:
                return e.get('Subject',' ')
            else:
                return "New email from %s." % Gmail.getSender(e)

        for e in emails:
            self.q.put(styleEmail(e))

        return lastDate
Ejemplo n.º 6
0
    def handleEmailNotifications(self, lastDate):

        emails = Gmail.fetchUnreadEmails(self.profile,
                                         since=lastDate,
                                         markRead=True)
        if emails:
            lastDate = Gmail.getMostRecentDate(emails)

        def styleEmail(e):
            nome = Gmail.getSender(e)
            if string.find(nome, "Google Calendar") != -1:
                return e.get('Subject', ' ')
            else:
                return "New email from %s." % Gmail.getSender(e)

        for e in emails:
            self.q.put(styleEmail(e))

        return lastDate
Ejemplo n.º 7
0
 def styleEmail(e):
     return "New email from %s." % Gmail.getSender(e)
Ejemplo n.º 8
0
 def styleEmail(e):
     return "New email from %s." % Gmail.getSender(e)
Ejemplo n.º 9
0
 def style_email(e):
     return "New email from %s." % Gmail.get_sender(e)
Ejemplo n.º 10
0
 def styleEmail(e):
     return "Nowy email od %s." % Gmail.getSender(e)
 def styleEmail(e):
     return "Nuevo correo de %s." % Gmail.getSender(e)
Ejemplo n.º 12
0
 def styleEmail(e):
     nome = Gmail.getSender(e)
     if string.find(nome, "Google Calendar") != -1:
         return e.get('Subject', ' ')
     else:
         return "New email from %s." % Gmail.getSender(e)
Ejemplo n.º 13
0
 def styleEmail(e):
     nome = Gmail.getSender(e)
     if string.find(nome,"Google Calendar") != -1:
         return e.get('Subject',' ')
     else:
         return "New email from %s." % Gmail.getSender(e)