Django Configuration 163 QQ mailbox Send mail

Source: Internet
Author: User
Configuring 163 Mailboxes
#邮件发送配置
email_backend = ' django.core.mail.backends.smtp.EmailBackend '
email_host = ' smtp.163.com '
Email_port =
#发送邮件的邮箱
email_host_user = ' *******@163.com '
#在邮箱中设置的客户端授权密码
email_host_password = ' '
#收件人看到的发件人
email_from = ' python<*****@163.com> '  # requires the same as the mailbox number
Configure QQ Mailbox
# Use QQ mailbox to send mail
email_host = ' smtp.qq.com '
mailbox
email_host_user = ' ******* @qq. com '
authorization code
EMAIL_ Host_password = ' ********* '
port
email_port = 587
email_use_tls = True
email_from = ' ******** @qq. com '  need to match the mailbox number
 view function from Django.core.mail import send_mail from django.conf import Settings def send_email_d Emo (Request): from_who = settings. Email_from # The sender has been written in the configuration of the direct type configuration in the Get to_who = ' ******@163.com ' # recipient is a list subject = ' Send a connection ' # Send the subject # sent Message = ' Click to jump Oh ha ha ha hehe ' # Send ordinary messages when using message # meg_html = ' <a href= ' http://www.baidu.com ' > click Jump </A&G  t; ' # sent is an HTML message that needs to be specified Send_mail (subject, message, from_who, [to_who], html_message=meg_html) return HttpResponse ("OK ")" "Source: Send_mail Source Parameters many def send_mail (subject, message, From_email, Recipient_list, Fail_silen Tly=false, Auth_user=none, Auth_password=none, Connection=none, Html_message=none): "" "

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.