Commit d7992745 by Tu Nombre

Correccion

1 parent 5afef67e
...@@ -195,10 +195,12 @@ class Mail(ServiceBase): ...@@ -195,10 +195,12 @@ class Mail(ServiceBase):
data={"personalizations": [{"to": [{"email": msg['To']}]}], data={"personalizations": [{"to": [{"email": msg['To']}]}],
"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"])}]}
"attachments": msg["Adjuntos"]} if not msg["Adjuntos"] == 0:
import ipdb; ipdb.set_trace() data["attachments"] = msg["Adjuntos"]
#import ipdb; ipdb.set_trace()
requests.post(url="https://api.sendgrid.com/v3/mail/send",data=json.dumps(data), headers=headers ) requests.post(url="https://api.sendgrid.com/v3/mail/send",data=json.dumps(data), headers=headers )
print(requests.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!