I assume that you are trying to pass data from one 'standalone' cgi script to another cgi script (mail.py). Depending on what exactly you are trying to do, you could either set the information in a cookie, or simply have a hidden input (<input type='hidden' name="data_to_pass_on" value="bob">) element in the HTML which gets populated by the initial cgi script and is then read by mail.py.
-- http://mail.python.org/mailman/listinfo/python-list