mail 拆分模块

增加 js 的压缩配置

修改设置,增加备案号

Squash from 3dd19cf to bfc4123 by virusdefender
This commit is contained in:
virusdefender
2015-12-07 19:14:43 +08:00
parent 6292592b98
commit 492e7446b1
8 changed files with 95 additions and 89 deletions

15
utils/mail.py Normal file
View File

@@ -0,0 +1,15 @@
# coding=utf-8
from envelopes import Envelope
from django.conf import settings
def send_email(from_name, to_email, to_name, subject, content):
envelope = Envelope(from_addr=(settings.SMTP_CONFIG["email"], from_name),
to_addr=(to_email, to_name),
subject=subject,
html_body=content)
envelope.send(settings.SMTP_CONFIG["smtp_server"],
login=settings.SMTP_CONFIG["email"],
password=settings.SMTP_CONFIG["password"],
tls=settings.SMTP_CONFIG["tls"])