__init__.py 文件源码

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

项目:DjangoBlog 作者: 0daybug 项目源码 文件源码
def mail_managers(subject, message, fail_silently=False, connection=None,
                  html_message=None):
    """Sends a message to the managers, as defined by the MANAGERS setting."""
    if not settings.MANAGERS:
        return
    mail = EmailMultiAlternatives('%s%s' % (settings.EMAIL_SUBJECT_PREFIX, subject),
                message, settings.SERVER_EMAIL, [a[1] for a in settings.MANAGERS],
                connection=connection)
    if html_message:
        mail.attach_alternative(html_message, 'text/html')
    mail.send(fail_silently=fail_silently)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号