For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > January 2007 > what is wrong with this sendmail program?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author what is wrong with this sendmail program?
Mark Tarver

2006-12-01, 6:55 pm

Hi,

This is a perl program I cribbed for sending the mail from a series of
forms. It fails to work with the message.

Software error:
Can't open mailprog.

For help, please send mail to this site's webmaster, giving this error
message and the time and date of the error.

Any ideas why?

Mark
________________________________________
_____________________________________
#!/usr/bin/perl -wT
use CGI qw(:standard);
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
use strict;

#me! and you! replace real addresses

open(SENDMAIL, "/usr/sbin/sendmail -oi -t -odq") or die "Can't fork for
sendmail: $!\n";
print sendmail <<"EOF";
From: me!
To: you!
Subject: form
my $name = param('name');
my $email = param('email');
my $commqi = param('commqi');
my $commqitk = param('commqitk');
my $inform = param('inform');
my $support = param('support');
my $consultation = param('consultation');
my $lisp = param('lisp');
my $os = param('os');
my $remarks = param('remarks');
EOF
close(SENDMAIL) or warn "couldn't close sendmail";

Paul

2007-01-10, 6:55 pm

It seems straightforward. Have you checked if sendmail exists at that
location?

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com