Я не могу получить ни одного письма от Django send_mail? Где моя ошибка?
Я пытаюсь отправить письмо с помощью Django send_mail(), но не могу получить письмо от Django send_mail? Где моя ошибка?
if request.method == "POST":
depName = request.POST.get("sedep")
Pname = request.POST.get("name")
Pmail = request.POST.get("mail")
docName = request.POST.get("sedoc")
Pphone = request.POST.get("phone")
AppointDate = request.POST.get("date")
appointment_list = Appointment_List(se_dept = depName, se_doc = docName, patient_name = Pname, patient_phone = Pphone, patient_email = Pmail, calendar = AppointDate)
appointment_list.save()
# SEND EMAIL
subject = 'Your appointment status!'
message = 'hello '+ Pname + '! \n' + 'Welcome to Doctor appointment system.\n'+ 'Congratulations your appointment is booked.\n\n Thanking you Team malloc()'
from_email = settings.EMAIL_HOST_USER
to_list = [Pmail]
send_mail(subject,message,from_email,to_list,fail_silently = True)
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'sa3518548@gmail.com'
EMAIL_HOST_PASSWORD = 'uqnoifwqucnlefgp'
EMAIL_PORT = 587