in reply to sendmail not sending

I think you need to specify the recipient(s) on the command line, when using sendmail in this way. You might also want to consider the -i option, to stop it interpreting a . on its own as EOF:

open(MAIL, "| $sendmail -i $admin_mail") or die "Cannot open sendmail: $!";

You should, of course, check your local documentation for sendmail (man sendmail) for confirmation of this, as it may vary between Unix versions (I just did a quick test on HP-UX 11).

s^^unp(;75N=&9I<V@`ack(u,^;s|\(.+\`|"$`$'\"$&\"\)"|ee;/m.+h/&&print$&;

Replies are listed 'Best First'.
Re: Re: sendmail not sending
by dave_the_m (Monsignor) on May 25, 2004 at 10:50 UTC
    You could also use the -t option to sendmail to tell it to get its recipients from the To: header.

      Aha, yes, that too. I'd forgotten that one - thanks.

      I'm surprised no-one has yet pointed out that piping to sendmail might not be the best way of sending a mail. I tend to prefer Net::SMTP as it is more portable.

      But it depends what the OP has available, or was trying to achieve, I guess.

      s^^unp(;75N=&9I<V@`ack(u,^;s|\(.+\`|"$`$'\"$&\"\)"|ee;/m.+h/&&print$&;