PDA

View Full Version : Sendmail / Windows Question


sryder
02-28-2001, 10:56 PM
I have the following script created to simply submit an email form from Flash to the script and send it to the designated email address which is set inside the Flash file - but I realize that it only works with UNIX, how do I get it to work correctly in a windows enviroment ?

#!/usr/bin/perl
use CGI;
$query = new CGI;
for ($query->param) { $in{$_} = $query->param($_); }

unless(open(MAIL,"|/usr/lib/sendmail -t")) {
print "Content-type: text/html\n\n";
print "Unable to open sendmail binary.";
exit;
}
print MAIL "To: $in{mail_to}\n";
print MAIL "Subject: $in{mail_subject}\n";
print MAIL "From: $in{mail_from}\n\n";
print MAIL $in{mail_message};
close(MAIL);

print "Location: http://www.webryder.com\n\n";

Thanks for any advice - please feel free to contact me directly !

Jesse
03-01-2001, 10:55 AM
That's a standard CGI script.. to get it working on Windows you will need to be running a local web server. Try PWS (by Microsoft) or Apache ( http://www.apache.org - my favourite ).

Cheers

Jesse

sarijit
05-09-2005, 01:59 PM
Why not use PHP & just create a file called mailer.php

<?php

mail($to,$sub,$body,$additional_headers);

?>

You are done. :)

regards
WC