in reply to TKI cart

Why don't you use the absolute URL of the page if you have problems creating a relative URL to the page? I'm guessing it's http://www.mywebsite/cgi-bin/formmail.pl, but you didn't specify.

www.mywebsite.com/cgi-bin/formmail.pl

Not likely to be correct. If this relative URL is visited from

http://www.mywebsite.com/path/page.html
it refers to
http://www.mywebsite.com/path/www.mywebsite.com/cgi-bin/formmail.pl

mywebsite.com/cgi-bin/formmail.pl

Not likely to be correct. If this relative URL is visited from

http://www.mywebsite.com/path/page.html
it refers to
http://www.mywebsite.com/path/mywebsite.com/cgi-bin/formmail.pl