Dear Michael,
I found your page while searching for a solution to this problem. I am in trouble with my ISP for using a script to send mail to a few specific addresses, by simply opening a channel to MAIL, printing all the mail message commands to it then closing it. (Note. The actual email address comes from a text file and is not visible in the HTML)
It seems the spammers have figured a way of using this to ... well, spam. A friend suggested I use some secure method to actually log in to my SMTP server which prevents anyone else from calling my script from outside. I'm not sure if your script here addresses that. But if you can help me that'd be cool.
My ISP is threatening to shutdown my siets, unless I can fix this. They have (apparently) been blacklisted by AOL! - so, its understandable.
Thanks,
~AS.