示例#1
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)
示例#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
 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)