Sending email by using QQ smtp service in Django

* How to configure QQ smtp







* How to configure Django 

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST_USER = "327696170@qq.com"
EMAIL_HOST = 'smtp.qq.com'
EMAIL_PORT = 25
EMAIL_USE_TLS = True
EMAIL_HOST_PASSWORD = "ymlb****c"

Here I masked the PASSWORD.

Run python manage.py shell:
from django.core.mail import send_mail
email_title = 'from hester'
email_title = 'from hester'
email_body = 'password reset'
email = 'email_you_want_to_send_to'
send_mail(email_title,email_body,'327696170@qq.com',[email])

If it return 1, it means that the email has been sent to the target email.









Comments

Popular posts from this blog

gspread error:gspread.exceptions.SpreadsheetNotFound

Miniconda installation problem: concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.

转载:彻底搞清楚promoter, exon, intron, and UTR