aboutsummaryrefslogtreecommitdiffstats
path: root/97suifangqa/apps/sfaccount/functional/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to '97suifangqa/apps/sfaccount/functional/__init__.py')
-rw-r--r--97suifangqa/apps/sfaccount/functional/__init__.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/97suifangqa/apps/sfaccount/functional/__init__.py b/97suifangqa/apps/sfaccount/functional/__init__.py
new file mode 100644
index 0000000..6cfbcbf
--- /dev/null
+++ b/97suifangqa/apps/sfaccount/functional/__init__.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+
+from django.conf import settings
+from sfaccount.functional.mail import send_mail_multipart
+
+EMAIL = settings.SF_EMAIL
+
+def send_mail(to, subject, content_text=None, content_html=None):
+ send_mail_multipart(
+ host=EMAIL['smtp_host'],
+ port=EMAIL['smtp_port'],
+ username=EMAIL['username'],
+ password=EMAIL['password'],
+ mail_from=EMAIL['from'],
+ mail_to=to,
+ subject=subject,
+ content_text=content_text,
+ content_html=content_html,
+ display_from=EMAIL['display_from']
+ )
+