Commit 95983bd4 by Juan Pablo

anda sin adjuntos

1 parent d7992745
...@@ -196,11 +196,11 @@ class Mail(ServiceBase): ...@@ -196,11 +196,11 @@ class Mail(ServiceBase):
"from": {"email": Mail}, "from": {"email": Mail},
"subject": msg['Subject'], "subject": msg['Subject'],
"content": [{"type": "text/plain", "value": str(msg["Body"])}]} "content": [{"type": "text/plain", "value": str(msg["Body"])}]}
if not msg["Adjuntos"] == 0: if not len(msg["Adjuntos"]) == 0:
data["attachments"] = msg["Adjuntos"] data["attachments"] = msg["Adjuntos"]
#import ipdb; ipdb.set_trace() #import ipdb; ipdb.set_trace()
requests.post(url="https://api.sendgrid.com/v3/mail/send",data=json.dumps(data), headers=headers ) r = requests.post(url="https://api.sendgrid.com/v3/mail/send",data=json.dumps(data), headers=headers )
print(requests.text) print(r.text)
return(msg["succ"]) return(msg["succ"])
def leerDatosparaApi(self, info, data): def leerDatosparaApi(self, info, data):
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!