help with sending mail in Program

I

Ivan Shevanski

Hey i'm new here and relatively new to python. I've made a few small
programs and now I'm making a program for my friends that at the end has a
feedback form. I want to send the feedback back to my email adress. I know
I should use the SMTP module and I have figured out how to send with it, but
I can't figure out how to include my variables in it, such as the questions
I ask them. Can someone explain this to me?
-Ivan

_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement
 
C

Chris Curvey

Maybe you could give us a little more info about where you're getting
messed up. The message body is just a string, so if you can build a
string out of variables, you should be able to do it.
 
F

Fuzzyman

Ivan said:
Hey i'm new here and relatively new to python. I've made a few small
programs and now I'm making a program for my friends that at the end has a
feedback form. I want to send the feedback back to my email adress. I know
I should use the SMTP module and I have figured out how to send with it, but
I can't figure out how to include my variables in it, such as the questions
I ask them. Can someone explain this to me?
-Ivan
If you look at the cgiutils module at :
http://www.voidspace.org.uk/python/recipebook.shtml

It contains a couple of different functions for sending emails from
Python. One using SMTP (either with a login or without), or using the
sendmail program.

You pass the body of the message to them as a string - so it will be
easy enough to construct the string in the way you want.

Regards,


Fuzzy
http://www.voidspace.org.uk/python
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top