backends.py 文件源码

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

项目:munch-core 作者: crunchmail 项目源码 文件源码
def apply(self, item, policies_list):
        # if double opt-in is set up, we use the validation mail to check
        # bounce
        if 'DoubleOptIn' not in policies_list:
            return_path = 'subscription-bounce+{uuid}@{fqdn}'.format(
                uuid=item.uuid, fqdn=settings.RETURNPATH_DOMAIN)
            message = EmailMessage(
                subject='Votre inscription',
                body=render_to_string(
                    'contacts/bounce_check_confirmation.txt',
                    {'contact': item}),
                to=(item.address, ),
                from_email='{} <{}>'.format(
                    settings.SERVICE_MSG_FROM_NAME,
                    settings.SERVICE_MSG_FROM_EMAIL),
                headers={
                    'Auto-Submitted': 'auto-generated',
                    'Return-Path': return_path})
            message.send()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号