[Python-es] Adjuntos correo - Crear MIMEBase ya con un fichero ya en base64

gerardo Juarez gerardojuarez en buyteknet.info
Mie Sep 5 16:57:03 CEST 2012


Raimon Esteve wrote:
> la respuesta es:
>
> attachment.set_payload(base64.b64encode(data))
>
> gracias raimon ;)
>
> -- 
> Si us plau, NO adjunti arxius a les seves respostes. Li preguem que 
> integri el text al cos del missatge. Pot respondre usant NetEtiquete 
> que li ajudarà a seguir la conversa. 
> http://es.wikipedia.org/wiki/Netiquette 
> <http://es.wikipedia.org/wiki/Netiquette>
>
> Por favor, NO adjunte archivos a sus respuestas. Le rogamos que 
> integre el texto en el cuerpo del mensaje. Puede responder usando 
> NetEtiquete que le ayudará a seguir la 
> conversación.http://es.wikipedia.org/wiki/Netiquette
>
> Please, DO NOT send attachment files with your answers, just copy and 
> paste only the text you need to send into the body of your mails. 
> Repply using NetEtiquete. http://en.wikipedia.org/wiki/Netiquette
> ------------------------------------------------------------------------
>
> _______________________________________________
> Python-es mailing list
> Python-es en python.org
> http://mail.python.org/mailman/listinfo/python-es
> FAQ: http://python-es-faq.wikidot.com/
>   
No será más bien "decode"?

attachment.set_payload(base64.b64decode(data))

Porque el problema decías que era que data terminaba codificada dos 
veces con base64.

saludos
Gerardo



Más información sobre la lista de distribución Python-es