Hello,
I remember, I had some difficulties with mail-scripts too.
Unfortunately i don't have examines my difficulties.
I post you a test script (see the attachment)
which works on my system.
Maybe it helps you...
If not, throw it away.
:)
regards
Oliver
Message from thursday 28 June 2001 09:53:
> >> The close statement is as follows:
> >> 85 close(MAIL) or die "Can't close pipe to $sendmail: $!\n";
> >>
> >> As you can see the value of $! is passed on to the browser together
> >> with the message. But unfortunately I can see no value to speak of.
> >> In other words the value must be blank.
> >
> > Aarrgghh!! is all I can say.
> >
> >> The strange thing to me is
> >> that it worked 100% on Solaris 2.7. Has any body else tested this
> >> specific perl code on Solaris 2.6? What else could be the difference?
> >
> > Sorry, I'm completely mystified.
> >
> > Have you tried running an entirely separate Perl script that just opens
> > MAIL and writes to it? If that works, then it's something in the
> > environment in which you are running it live.
>
> To be honest I'm not sure how I should do that. Will have to search for
> examples.
>
> Have tried another mail script from www.unimelb.edu.au but it also works
> through using the pipe.
>
> 458 if( ! -e "$sendmail") { &error("Couldn't find sendmail
> [$sendmail]: $!"); }
> 459 open(MAIL,"| $sendmail -t") or &error("Couldn't
> open sendmail process: $!");
> 460 select MAIL;
> 461 print "To: $destination\n";
> 462 print "Subject: $subject\n";
> 463 print "From: $from_addr\n" if $from_addr;
> 464 print "Reply-to: $reply_to\n" if $reply_to;
> 465 foreach $header (keys(%headers)) {
> 466 print "$header: $headers{$header}\n";
> 467 }
> 468 print "X-Generated-By: CGI-Mailer v$version:
> http://www.unimelb.edu.au/cgi-mailer/\n";
> 469 print "X-Form: $ENV{'HTTP_REFERER'}\n";
> 470 print "\n";
> 471 print "$format";
> 472 close(MAIL);
>
> This script as you can see has no error checking on the close
> statement so when I ran it for the first time it looked to be
> working perfectly but I never received the test message. So I
> added the error checking as follows:
>
> 472 close(MAIL) or &error("Can't close pipe to $send mail: $!");
>
> And when doing this I get the same result as in my small script. Now
> this cgi-mailer has some nifty features like mailing diretly through
> SMTP but then I bypass exim completely as far as I understand it.
>
> Regards,
> Gustav
>
> --
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim
> details at http://www.exim.org/ ##
--
Oliver Egginger
FH Giessen-Friedberg
DV-Zentrum
Wiesenstrasse 14
35390 Giessen
Tel. +49 641 309-1283
Fax +49 641 309-2908
Mail: Oliver.Egginger@???
****************************************************
Sprechzeiten des DV-Zentrums fuer
E-Mail-Angelegenheiten:
Mo 8:30 - 11:15 Uhr
Di 11:30 - 13:30 Uhr
Mi 11:30 - 13:30 Uhr
Do 8:30 - 13:30 Uhr
****************************************************