
Django Messages
Jan 08, 2023
Do you need to send emails through your own Django app? In this platform you learn how to configure Django SMTP, set up passwords, send emails, and more.Here are the steps:
In views.py
from django.conf import settings
from django.core.mail import send_mail
send_mail(
'Here is Subject',
'Here is the message.',
'linked email address',
['client email address'],
fail_silently=False,
)
In settings.py
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_HOST_USER = 'email address'
EMAIL_HOST_PASSWORD = 'application password'
Please share this page to friends.
Asif Shahzad | Full Stack Web Developer
We have expertise in website designing & development, software solutions, mobile app development, e-commerce solutions and graphic designing. We transform your visions into reality by providing 24/7 services.