Guest User

Untitled

a guest
Nov 29th, 2017
410
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. from django.core.mail import send_mail
  2.  
  3. result = send_mail(subject, message, from_email, to_email_list, fail_silently=False)
  4.  
  5. print(result) # there prints `1`
  6.  
  7. EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
  8.  
  9. EMAIL_USE_TLS = True
  10. EMAIL_HOST = 'smtp.qq.com' # QQ:smtp.qq.com 163:smtp.163.com
  11. EMAIL_PORT = 465
  12. EMAIL_HOST_USER = 'qiyunserveremail@qq.com'
  13. EMAIL_HOST_PASSWORD = 'qiyunserver_password'
  14. DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
  15.  
  16. Content-Type: text/plain; charset="utf-8"
  17. MIME-Version: 1.0
  18. Content-Transfer-Encoding: 8bit
  19. Subject: =?utf-8?b?5Li76aKY?=
  20. From: qiyunserveremail@qq.com
  21. To: lxt123@126.com
  22. Date: Thu, 30 Nov 2017 03:02:26 -0000
  23. Message-ID: <20171130030226.15096.58930@aircraftdemacbook-pro.local>
  24.  
  25. 内容
  26. -------------------------------------------------------------------------------
  27. 1 # this is the print(result)
Add Comment
Please, Sign In to add comment