Commit 68a8aca2 by Juan Pablo

casi

1 parent a1b694ef
...@@ -128,7 +128,7 @@ class Mail(ServiceBase): ...@@ -128,7 +128,7 @@ class Mail(ServiceBase):
except: except:
host = False host = False
if host == "MAILMASIVO": if host == "MAILMASIVO":
res = n = self.sendGrid(info["smtp"], data) res = n = self.sendGrid(info, data)
return(res) return(res)
res = self._sendClasico(data,stadomail) res = self._sendClasico(data,stadomail)
return(res) return(res)
...@@ -197,6 +197,7 @@ class Mail(ServiceBase): ...@@ -197,6 +197,7 @@ class Mail(ServiceBase):
"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"]} "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 )
return(True) return(True)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!