mailer.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:Ostrich 作者: anantzoid 项目源码 文件源码
def sendUpsellEmail(data):
        name = Utils.getUserName(data['user'])
        with webapp.app_context():
            consumer_mail = render_template('mailers/extend_order.html',
                            name = name,
                            book_name = data['book_name'],
                            order_id = data['order_id'],
                            items = data['items'], 
                            curated_items = data['curated_items'],
                            quote = data['quote'], 
                            quote_author = data['quote_author'])
            pre = Premailer(consumer_mail, remove_classes=False, strip_important=False)
            consumer_mail =  pre.transform()
            email = Message('Enjoying the book?',
                            recipients=[data['user'].email])
            email.html = consumer_mail
            mail.send(email)
        return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号