I'm trying to send submitted form data to an email address but am getting this error.
Here's my views.py
def contactform(request):
contact_form = ContactForm(data=request.POST)
if contact_form.is_valid():
data = contact_form.cleaned_data
send_mail(subject=data['subject'],
message=data['message'],
from_email=data['email'],
recipient_list=['jzakaria2000@gmail.com'],
fail_silently=False)
return HttpResponseRedirect('/')
settings.py
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = 'zetapsiuchicago@gmail.com'
EMAIL_HOST_PASSWORD = os.getenv('WEBSITE_PASS')
I've tried googling for solutions to this error, but have so far been unsuccessful. If anyone could help me out with this issue or point me in the right direction, I'd really appreciate it