From May 30 2022 onwards Gmail removed Less Secure apps access in gmail.
Is there any alternative email provider we can use or is there any solution for it?
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'mail@gmail.com'
EMAIL_HOST_PASSWORD = 'password'
EMAIL_PORT = 587
if request.method == "POST":
name = request.POST['form_name']
email = request.POST['form_email']
subject = request.POST['form_subject']
message = request.POST['form_message']
send_mail(subject,message,email,['mail@gmail.com'] )
return render(request, 'pages/contact.html', {'name': name})
else:
return render(request, 'pages/contact.html', {})
Need help, Thanks in advance.