Commit 5afef67e by Tu Nombre

Correccion

1 parent 68a8aca2
......@@ -79,7 +79,7 @@ class Process:
salio = salio + 1
except:
success = {'texto': False}
print("Rompio el proseso de envio procces 71")
print("Rompio el proseso de envio procces linea 82")
#print("proces linea 72 success=", success)
d = json.loads(query[Table.type])
partial = False
......
......@@ -128,7 +128,7 @@ class Mail(ServiceBase):
except:
host = False
if host == "MAILMASIVO":
res = n = self.sendGrid(info, data)
res = self.sendGrid(info, data)
return(res)
res = self._sendClasico(data,stadomail)
return(res)
......@@ -197,9 +197,9 @@ class Mail(ServiceBase):
"subject": msg['Subject'],
"content": [{"type": "text/plain", "value": str(msg["Body"])}],
"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 )
return(True)
return(msg["succ"])
def leerDatosparaApi(self, info, data):
Cr = ValidacionCorreo()
......@@ -209,8 +209,10 @@ class Mail(ServiceBase):
msg['Subject'] = info['subject']
msg['Body'] = ""
msg["Adjuntos"] = []
msg["succ"] = {}
for file in types:
filepath = data[Table.path] + file
msg["succ"][file] = True
if file == 'texto':
objeto = open(filepath, "r")
msg["Body"] = objeto.read()
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!