On Tue, 26 Oct 1999, Dave Mee wrote:
|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."\"");
Are you sure you don't mean "| $sendmailpath" instead of $sendmailpath ?
Open won't fail here, since it means open for reading ...
Try also doing error checking on the print:
print SENDMAIL "(...)" or die $!;
That should be more helpful ...
| 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. 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.
|
|Anyone else had similar problems (or solutions :), or should I Just Shut
|Up?
|
|Dave
|
|