Sendmail on CPanel

Hello,

I am running a shell script (as root) that uses the following to send out an email:
open (MAIL, "| $sendmail -t") || die "I can't open sendmail\n";
print MAIL "To:$email\n";
print MAIL "From: WebXonline Sales Department <brandon\@$hostdomain>\n";
print MAIL "Subject: Important Account Information!\n";
print MAIL <<EOT;

$sendmail is defined as /usr/sbin/sendmail

I receive the email just fine, but the server is ignoring the From and Subject, it is sending it from "root" with a blank subject.

Any suggestions? This works on my other two servers.

 

 

 

 

Top