使用SendGrid Web API发送邮件时SSL证书验证失败问题求助
SendGrid Web API发送邮件时SSL证书验证失败问题求助
大家好,我在用SendGrid Web API发送邮件的时候碰到了SSL证书验证失败的错误,现在完全搞不清楚它到底在验证哪个证书。我已经完成了SendGrid账户里的用户验证和域名验证,而且发送流程写得非常简单,可还是出了问题。
下面是我遇到的错误:
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)>
我的代码如下:
mailClient = SendGridAPIClient(os.environ.get('sendGridKey')) message = Mail( from_email=os.environ['sendGridEmail'], to_emails="dev@cribbi.co", subject="User Message for %s" %newMessage['chatId'], html_content = "<strong>" + newMessage['message']['text'] + "</strong>" ) mailRes = mailClient.send(message)
有没有大佬能帮我看看这是怎么回事呀?
备注:内容来源于stack exchange,提问作者Mitchell Leefers
相关产品推荐
相关产品推荐

