Django contact form sending email

拜拜、爱过 提交于 2019-11-29 17:25:57

The console backend, as the name suggests, prints out the email to the console and doesn't do anything else.

You need to use a different email backend, for example the smtp backend is the default:

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

You'll then have to configure your settings like EMAIL_HOST with your email provider's settings. See the docs for more info.

If you don't want to use the SMTP backend, another common choice is to use a transactional mail provider like Mailgun or SendGrid. Some of these services have free usage tiers which should be sufficient for a low-volume contact form. The django-anymail app supports several transactional mail providers.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!