这是我通过Django发送邮件时看到的内容:
这是我在settings.py中的电子邮件配置:[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)
# Email Settings
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
EMAIL_HOST = "smtp.gmail.com"
EMAIL_PORT = 587
EMAIL_HOST_USER = "xxxxxxxx@gmail.com"
EMAIL_HOST_PASSWORD = "xxxxxxxxxxxxx"
EMAIL_USE_TLS = True
这是我发送邮件的方式:
send_mail(
"Subject",
"Test message",
settings.EMAIL_HOST_USER,
["xxxxxxxxx@gmail.com"],
fail_silently=False,
)