passing string from one file to another

Kun neurogasm at gmail.com
Mon Apr 17 00:23:43 EDT 2006


I have a python-cgi form whose sole purpose is to email.

It has the fields 'to', 'from', 'subject', 'body', etc. and if the user 
fills them out and clicks submit, it will invoke another file called 
mail.py which uses smtplib to send the message.

This works fine but instead of typing in a 'body', i would like the 
initial python program to just send a string as the body of the email. 
now normally i'd just set the msg in the mail.py file equal to the 
string, however, i do not know how to link a string from another python 
file to the mail.py file.

does anyone know a solution to this?



More information about the Python-list mailing list