コード例 #1
0
ファイル: commands.py プロジェクト: stephanie-wang/kindlebox
 def run(self):
     emails = set(row[0] for row in db.session.query(User.email).filter(User.id < 500).all())
     with open('app/static/html/bookdrop_reactivate.html') as f:
         html = f.read()
         for email in emails:
             print emailer.send_mail('*****@*****.**', ['*****@*****.**'], subject='Bookdrop relaunch', html=html, bcc=[email])
             time.sleep(0.1)
コード例 #2
0
 def run(self):
     emails = set(row[0] for row in db.session.query(User.email).filter(
         User.id < 500).all())
     with open('app/static/html/bookdrop_reactivate.html') as f:
         html = f.read()
         for email in emails:
             print emailer.send_mail('*****@*****.**',
                                     ['*****@*****.**'],
                                     subject='Bookdrop relaunch',
                                     html=html,
                                     bcc=[email])
             time.sleep(0.1)
コード例 #3
0
 def run(self):
     emails = [
         row[0] for row in db.session.query(User.email).filter_by(
             active=True).all()
     ]
     with open('app/static/html/bookdrop_rename_email.html') as f:
         html = f.read()
         for email in emails:
             emailer.send_mail('*****@*****.**',
                               ['*****@*****.**'],
                               subject='Kindlebox is now BookDrop',
                               html=html,
                               bcc=[email])
コード例 #4
0
def _email_attachments(email_from, email_to, attachment_paths):
    status, message = emailer.send_mail(email_from, email_to,
                                        attachment_paths)
    if status != 200:
        raise KindleboxException(message)
コード例 #5
0
ファイル: commands.py プロジェクト: linan7788626/kindlebox
 def run(self):
     emails = [row[0] for row in db.session.query(User.email).filter_by(active=True).all()]
     with open('app/static/html/bookdrop_rename_email.html') as f:
         html = f.read()
         for email in emails:
             emailer.send_mail('*****@*****.**', ['*****@*****.**'], subject='Kindlebox is now BookDrop', html=html, bcc=[email])
コード例 #6
0
def _email_attachments(email_from, email_to, attachment_paths):
    status, message = emailer.send_mail(email_from, email_to, attachment_paths)
    if status != 200:
        raise KindleboxException(message)