示例#1
0
    def process(self):
        digest = self.get_digest()
        html = render_collection(digest)
        Mail(html=html, to_emails=self._emails, from_email="*****@*****.**", subject="Digestive")
        self._state.last_sent = datetime.now()

        self._state.save()
示例#2
0
    def process(self):
        digests = [
            self.create_digest('issues', self.get_issues()), 
            self.create_digest('pulls', self.get_pulls())
        ]

        html = render_collection(digests)

        gmailer = Mailer(host='smtp.gmail.com', port=465, usr='******', pwd='password')

        Mail(html=html, to_emails=self._emails, from_email="*****@*****.**", subject="Digestive", mailer = gmailer)
        self._state.last_sent = datetime.now()

        self._state.save()