MIME text attachment question

Gabriel Genellina gagsl-py at yahoo.com.ar
Thu Jan 25 19:31:30 EST 2007


At Thursday 25/1/2007 08:41, Neal Becker wrote:

>I want to send a file (plain text) as an attachment.
>
>I'm using MIMEText.  This attaches text OK, but I would like to have a
>filename attached to it, so that the recipient could save it without having
>to specify a filename.

part = MIMEText("Hello world!")
part.add_header('Content-Disposition', 'attachment', filename='x.txt')




-- 
Gabriel Genellina
Softlab SRL 


	

	
		
__________________________________________________ 
Preguntá. Respondé. Descubrí. 
Todo lo que querías saber, y lo que ni imaginabas, 
está en Yahoo! Respuestas (Beta). 
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas 




More information about the Python-list mailing list