in reply to give perl an email
i have qmail on a freebsd server, so my .qmail file looked like this:
|/usr/home/justin/wwwdev/cgi-bin/mojo/take_mail.cgi
and my little program looks like this: (lots of code... ok almost all the code from the soam article)
#!/usr/bin/perl
#take_mail.cgi
use strict;
my ($header, $body);
my $recieved = "/usr/home/justin/wwwdev/cgi-bin/mojo/recieved.html";
my$mailprog = "/usr/sbin/sendmail";
{ local $/ = "";
$header = <STDIN>;
undef $/;
$body = <STDIN>;
}
open(MAIL,"|$mailprog -t");
print MAIL "From: <justin\@skazat.com>\n";
print MAIL "To: <justin\@skazat.com>\n";
print MAIL "Subject: perl wants to says hi to you all\n\n";
print MAIL "header: $header\n";
print MAIL "body: $body\n\n";
close (MAIL);
and thats all there is too it, thanks everyone!
|
|---|