Email en HTML

JC jcanto en hispasec.com
Vie Sep 12 15:54:39 CEST 2003


Si, solo tienes que añadirlo como attachment.

(conexion = conexion ya abierta con SMTP)

 from email.MIMEBase import MIMEBase
 from email.MIMEText import MIMEText
 import smtplib

 msg = MIMEBase('multipart','mixed')
 msg['Subject'] = "asunto"
 msg['From'] = "de"
 msg['To'] = "a"
 msghtm = MIMEText("texto html","html")
 msg.attach(msghtm)
 msgtxt = MIMEText("texto normal")
 msg.attach(msgtxt)
 conexion.sendmail("de","a", msg.as_string())


----- Original Message -----
From: "François Heredero - Top Music SA" <fheredero en topmusic.ch>
To: "La lista de python en castellano" <python-es en aditel.org>
Sent: Friday, September 12, 2003 3:48 PM
Subject: [Python-es] Email en HTML


> Hola,
> Algien sabe como enviar un email en formato HTML ?




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