How to send email via Django?
2013-12-12 16:52
281 查看
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' # Host for sending e-mail. EMAIL_HOST = 'localhost' # Port for sending e-mail. EMAIL_PORT = 1025 # Optional SMTP authentication information for EMAIL_HOST. EMAIL_HOST_USER = '' EMAIL_HOST_PASSWORD = '' EMAIL_USE_TLS = False
my email:
from django.core.mail import EmailMessage email = EmailMessage('Hello', 'World', to=['user@gmail.com']) email.send()
of course, if I setup a debugging server via
python -m smtpd -n -c DebuggingServer localhost:1025, I can see the email in my terminal.
相关文章推荐
- How to send email via vbs using cdo
- How to send Email using C#
- prjSendMailInUniversity - How to send email using VB & Winsock - 邮件发送接收程序 - VB6 + Winsock
- How to use LabVIEW to send Email?
- How to send Email through external SMTP server on Ubuntu 14.04
- How to send an email from oracle workflow process using an AdHocRole?
- Enable PO approval process to send PO in PDF format via email
- How to Send an Email Using UTL_SMTP with Authenticated Mail Server. (文档 ID 885522.1)
- Salesforce: How to Send Email with Default Template?
- how to solve the problem which is the imail software can not send email in wan,but can send email in lan.
- 创造应用英语环境学英语-how to send email
- How to send Email asynchronously
- How to Send an Email Using UTL_SMTP with Authenticated Mail Server
- Custom checkout cart – How to send email after successful checkout
- How to make NAnt send an email using a real account
- How to Send an Email Using UTL_SMTP with Authenticated Mail Server
- Custom checkout cart – How to send email after successful checkout
- How to test if the server is configured well to send email to external accoun
- android: how to send email
- How to send email using sqlserver