#!/usr/bin/perl sub emailreply{ use strict;#comment this out after debugging, but leave it here for your next adventure use CGI; my $q = CGI->new(); $q->ReadParse(); my $smsreplydir = 'd:\inetpub\wwwroot\cgi-bin\classads\test'; my $from = $q->{ "from" }; my $msg = $q->{ "text" }; my $msgid = $q->{ "msgid" }; open (SMSREPLY, ">>$smsreplydir/abc.txt"); print SMSREPLY "\n $msgid\n $from\n\n $msg\n\n"; close SMSREPLY; print $q->header(); #sends your HTTP 200 OK header to the browser, you can control alot of this info yourself print $q->start_html();#handles the html body tag #There are more subs that can handle all of your html needs, tables, etc. print "Thanks for your input. The information has been forwarded to the Big Cheese.\n";#Change this to your liking print $q->end_html();#End the html page properly }