comprobantes = Documentacion.query.filter_by(
referencia=referencia2, notificacion="Comprobante").all()
listacomprobantes = []
listacomprobantes2 = []
#print (listacomprobantes)
for x in comprobantes:
print(x.nombre)
data = BytesIO(x.img)
encoded_img_data = base64.b64encode(data.getvalue())
image = encoded_img_data.decode('utf-8')
requests.post(
"https://api.mailgun.net/v3/***s",
auth=("api", "****"),
#files=[("attachment", ("prueba.pdf", open("prueba.pdf", "rb").read()))],
data={"from": "****@gmail.com",
"to": [para],
"subject": titulocorreo1,
"html": html,
})
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…