sendgrid-python
sendgrid-python copied to clipboard
Sending e-mails over 7-8MB fail on Google App Engine Standard
Issue Summary
I just switched from Google App Engine e-mail API to SendGrid. I used to have a 20MB limit per e-mail and I thought that SendGrid's 30MiB would be OK.
Now I cannot any messages over 7-8. The code stack trace is the following:
Code: sg = sendgrid.SendGridAPIClient(apikey=SENDGRID_KEY) ... response = sg.client.mail.send.post(request_body=data)
Stack Trace: File "/base/data/home/apps/s~APPNAME.405544986480217849/swplatform/util/sendgrid_mail.py", line 157, in Send response = sg.client.mail.send.post(request_body=data) File "/base/data/home/apps/s~neatschool2/1-96-85.405544986480217849/python_libs/python_http_client/client.py", line 227, in http_request return Response(self._make_request(opener, request)) File "/base/data/home/apps/s~neatschool2/1-96-85.405544986480217849/python_libs/python_http_client/client.py", line 157, in _make_request return opener.open(request) File "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/urllib2.py", line 433, in open response = self._open(req, data) File "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/urllib2.py", line 451, in _open '_open', req) File "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/urllib2.py", line 411, in _call_chain result = func(*args) File "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/urllib2.py", line 1245, in https_open context=self._context) File "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/urllib2.py", line 1205, in do_open r = h.getresponse(buffering=True) File "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/gae_override/httplib.py", line 524, in getresponse raise InvalidURL(str(e)) InvalidURL: Request exceeds 10 MiB limit for URL: https://api.sendgrid.com/v3/mail/send