如何将Sendgrid电子邮件与强制使用HTTPS的Flask应用程序一起使用?

如何将Sendgrid电子邮件与强制使用HTTPS的Flask应用程序一起使用?,http,flask,https,sendgrid,Http,Flask,Https,Sendgrid,我有一个应用程序需要使用SendGrid发送电子邮件,但我使用Flask Talisman强制HTTPS 当我现在尝试发送电子邮件时,SendGrid使用HTTP这一事实似乎引发了一个错误: File "/app/app/files.py", line 146, in email_my_lists response = sg.send(message) File "/app/.heroku/python/lib/python3.6/site-packages/sen

我有一个应用程序需要使用SendGrid发送电子邮件,但我使用Flask Talisman强制HTTPS

当我现在尝试发送电子邮件时,SendGrid使用HTTP这一事实似乎引发了一个错误:

File "/app/app/files.py", line 146, in email_my_lists
response = sg.send(message)
File "/app/.heroku/python/lib/python3.6/site-packages/sendgrid/sendgrid.py", line 95, in send
response = self.client.mail.send.post(request_body=message.get())
File "/app/.heroku/python/lib/python3.6/site-packages/python_http_client/client.py", line 262, in http_request
self._make_request(opener, request, timeout=timeout)
File "/app/.heroku/python/lib/python3.6/site-packages/python_http_client/client.py", line 176, in _make_request
exc = handle_error(err)
File "/app/.heroku/python/lib/python3.6/site-packages/python_http_client/exceptions.py", line 82, in handle_error
exc = err_dict[error.code](error)
File "/app/.heroku/python/lib/python3.6/site-packages/python_http_client/exceptions.py", line 10, in __init__
self.body = error.read()
File "/app/.heroku/python/lib/python3.6/tempfile.py", line 485, in func_wrapper
return func(*args, **kwargs)
File "/app/.heroku/python/lib/python3.6/http/client.py", line 472, in read
s = self._safe_read(self.length)
File "/app/.heroku/python/lib/python3.6/http/client.py", line 624, in _safe_read
raise IncompleteRead(b''.join(s), amt)
http.client.IncompleteRead: IncompleteRead(0 bytes read, 76 more expected)
是否有一种使用HTTPS使用SendGrid发送的方法?或者有没有办法允许SendGrid使用Talisman发出请求

请帮忙