Add mail conf to report error

Brightcells 7 年 前
コミット
58274b47eb
共有1 個のファイルを変更した33 個の追加0 個の削除を含む
  1. 33 0
      tamron/settings.py

+ 33 - 0
tamron/settings.py

@@ -178,6 +178,39 @@ LOGIT_RES_FLAG = True
178 178
 
179 179
 DOMAIN = 'http://tamron.xfoto.com.cn'
180 180
 
181
+# 错误信息邮件设置
182
+# Email address that error messages come from.
183
+SERVER_EMAIL = 'kimi@pai.ai'
184
+# The email backend to use. For possible shortcuts see django.core.mail.
185
+# The default is to use the SMTP backend.
186
+# Third-party backends can be specified by providing a Python path
187
+# to a module that defines an EmailBackend class.
188
+EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
189
+# Host for sending email.
190
+EMAIL_HOST = 'smtp.exmail.qq.com'
191
+# Port for sending email.
192
+EMAIL_PORT = 25
193
+# Optional SMTP authentication information for EMAIL_HOST.
194
+EMAIL_HOST_USER = 'kimi@pai.ai'
195
+EMAIL_HOST_PASSWORD = '<^_^>pwd<^_^>'
196
+EMAIL_USE_TLS = False
197
+EMAIL_USE_SSL = False
198
+EMAIL_SSL_CERTFILE = None
199
+EMAIL_SSL_KEYFILE = None
200
+EMAIL_TIMEOUT = None
201
+# Default email address to use for various automated correspondence from
202
+# the site managers.
203
+DEFAULT_FROM_EMAIL = 'Kimi <kimi@pai.ai>'
204
+# People who get code error notifications.
205
+# In the format [('Full Name', 'email@example.com'), ('Full Name', 'anotheremail@example.com')]
206
+ADMINS = [('Kimi', 'kimi@pai.ai')]
207
+# Not-necessarily-technical managers of the site. They get broken link
208
+# notifications and other various emails.
209
+MANAGERS = ADMINS
210
+# Subject-line prefix for email messages send with django.core.mail.mail_admins
211
+# or ...mail_managers.  Make sure to include the trailing space.
212
+EMAIL_SUBJECT_PREFIX = u'[Pai2] '
213
+
181 214
 try:
182 215
     from local_settings import *
183 216
 except ImportError: