Dave Mee <[EMAIL PROTECTED]> writes:
> Hello, mod_perloids.
>
> I'm having a gutfull of trouble sending mail under mod_perl. I'm doing
> it by the books, to wit, the cookbook and the bigbirdie book, under rh
> linux 5.2.
>
> the code is
>
> warn ("MAIL: Opening sendmail... path is \"".$sendmailpath."\"");
> open (SENDMAIL, $sendmailpath) || warn ("MAIL: Cannot open sendmail
> at \"".$sendmailpath."\"");
Let's assume that $sendmailpath is a pipe ("|/usr/lib/sendmail ...")
> print SENDMAIL ( "From: Eidos Web Password Assistant
> <passwordhelp\@".$dbh->{r}->server->server_hostname.">\n".
> "To: You <".$dbh->{param}->{csemail}.">\n".
> "Subject:
> ".$EidosParser::locale{mailsendpasswordsubject}."\n\n".
> $EidosParser::locale{mailsendpasswordtext1}.
> $result[1].
> $EidosParser::locale{mailsendpasswordtext2}.
> ($dbh->{r}->server->server_hostname).($dbh->{r}->uri()).
> $EidosParser::locale{mailsendpasswordtext3}.
> "\n.\n");
> warn ("MAIL: Mail Sent okay!");
> close (SENDMAIL);
>
> I ditched the fail-result tests in desperation. :)
>
> It tells me the mail has been sent okay (even when the failiure tests
> were in place) but nothing.
The essential failure-test is missing. Only during close() do you find
out if there was a problem writing to the pipe when the last (possibly
only) bufferful of data gets flushed to it.
> Not in the outgoing or incoming mail spools.
> I tested this code as a vanilla cgi script, and it worked fine. I have
> *no* idea why it won't work under mod_perl.
There shouldn't be much difference. Maybe some obscure environment
variable, or your cgi is suexec'ed to a different user?
--
Frank Cringle, [EMAIL PROTECTED]
voice: (+49 2304) 467101; fax: 943357