/ Published in: Django

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
In settings.py EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail.com' EMAIL_HOST_USER = 'youremail@gmail.com' EMAIL_HOST_PASSWORD = 'yourpassword' EMAIL_PORT = 587 You can use the shell to test it: >>> from django.core.mail import send_mail >>> send_mail('Test', 'This is a test', 'from@somewhere.com', ['youremail@somewhere.com'])
Comments
