in reply to Manually sending email.

The header lines have to be flush-left (i.e., preceded by newlines). You've got white space in front of them. Try:
print SENDMAIL qq^ From: Monitor <root\@host.domain.com> To: Pen Quin <penguinfuz\@another-domain.com> Subject: $hostname Monitoring Script Hello, I am the monitoring script for $hostname. ^;
BTW, the here-doc is just great for this kind of stuff:
print SENDMAIL <<EOM; From: Monitor <root\@host.domain.com> To: Pen Quin <penguinfuz\@another-domain.com> Subject: $hostname Monitoring Script Hello, I am the monitoring script for $hostname. EOM
Although it has the same white-space-preserving behavior. You can get around with some contortions, but it's a lot easier to just put everything flush-left.

HTH <code

Replies are listed 'Best First'.
Re: Re: Manually sending email.
by penguinfuz (Pilgrim) on Jun 13, 2001 at 06:52 UTC
    Thanks alot, I'm using the here-doc method now and it works fine; However, even flushing the text to the left with my original method didn't help.

    Oh well, I guess "the why" will come to me with time, right now I'm happy with the "how".

    Thanks again!
      Your original method would still wind up with a blank return for the first line. The return you typed right after
      print SENDMAIL qq^
      like this...

      --
      $you = new YOU;
      honk() if $you->love(perl)

        <clarifaction>...which, in email denotes the end of the headers; hence your error.</clarifaction>

        --
        RatArsed