# Send Email in django
1. Open setting.py in your Project.
2. Configure email settings in setting.py
EMAIL_HOST = 'mail.example.com'
EMAIL_HOST_USER = 'Enter your email '
EMAIL_HOST_PASSWORD = ' Enter your email password'
EMAIL_PORT = port number
EMAIL_USE_TLS = False
3. Open views.py
import from django.core.mail import send_mail
4. Create function
eg. def sendemail(request):
send_mail('Subject', Message, 'Sender email', [ToEmail], fail_silently=False)
1. Open setting.py in your Project.
2. Configure email settings in setting.py
EMAIL_HOST = 'mail.example.com'
EMAIL_HOST_USER = 'Enter your email '
EMAIL_HOST_PASSWORD = ' Enter your email password'
EMAIL_PORT = port number
EMAIL_USE_TLS = False
3. Open views.py
import from django.core.mail import send_mail
4. Create function
eg. def sendemail(request):
send_mail('Subject', Message, 'Sender email', [ToEmail], fail_silently=False)
No comments:
Post a Comment