By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,190 Members | 801 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,190 IT Pros & Developers. It's quick & easy.

Best way to construct an email - attach a html file and send

P: n/a
a
What is the best way to construct an email in python and also attach a
html file

the html file to be attached is not on disk, but should be dynamically
constructed in the python script

I want to attach the django debug error to an email and mail it to
myself whenever there is an error in the application

thanks a lot
py

Aug 9 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
a wrote:
What is the best way to construct an email in python and also attach a
html file

the html file to be attached is not on disk, but should be dynamically
constructed in the python script

I want to attach the django debug error to an email and mail it to
myself whenever there is an error in the application

thanks a lot
py
Here is a link to a class that will allow you to attach files. You
can either write the HTML to a tempfile and attach or modify a
little to accept a string or cstringIO object instead. Hope it
helps.

-Larry Bates
Aug 9 '06 #2

P: n/a

pyWhat is the best way to construct an email in python and also attach
pya html file
...

Check out the email package.

Skip
Aug 9 '06 #3

P: n/a
On 2006-08-09, a <a@tempinbox.comwrote:
What is the best way to construct an email in python and also
attach a html file

the html file to be attached is not on disk, but should be
dynamically constructed in the python script
Sounds like a job for MimeWriter to me.

--
Grant Edwards grante Yow! BEEP-BEEP!! I'm a
at '49 STUDEBAKER!!
visi.com
Aug 9 '06 #4

P: n/a
a
where is the link
thanks a lot for your kind help
Larry Bates wrote:
a wrote:
What is the best way to construct an email in python and also attach a
html file

the html file to be attached is not on disk, but should be dynamically
constructed in the python script

I want to attach the django debug error to an email and mail it to
myself whenever there is an error in the application

thanks a lot
py
Here is a link to a class that will allow you to attach files. You
can either write the HTML to a tempfile and attach or modify a
little to accept a string or cstringIO object instead. Hope it
helps.

-Larry Bates
Aug 13 '06 #5

P: n/a
a wrote:
where is the link
thanks a lot for your kind help
Larry Bates wrote:
>a wrote:
>>What is the best way to construct an email in python and also attach a
html file

the html file to be attached is not on disk, but should be dynamically
constructed in the python script

I want to attach the django debug error to an email and mail it to
myself whenever there is an error in the application

thanks a lot
py
Here is a link to a class that will allow you to attach files. You
can either write the HTML to a tempfile and attach or modify a
little to accept a string or cstringIO object instead. Hope it
helps.

-Larry Bates
Sorry, Left off the link:

http://motion.sourceforge.net/related/send_jpg.py
Aug 23 '06 #6

P: n/a
a
hey larry thanks
Larry Bates wrote:
a wrote:
What is the best way to construct an email in python and also attach a
html file

the html file to be attached is not on disk, but should be dynamically
constructed in the python script

I want to attach the django debug error to an email and mail it to
myself whenever there is an error in the application

thanks a lot
py
Here is a link to a class that will allow you to attach files. You
can either write the HTML to a tempfile and attach or modify a
little to accept a string or cstringIO object instead. Hope it
helps.

-Larry Bates
Aug 23 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.