Using sendmail from perl on cpanel(exim 4) server

Hello

1) Why doesn't this work
Code:
#!/usr/bin/perl


# send an email to notify an order has been received 
open(MAIL, "|/usr/sbin/sendmail -t") || return 0;
 
select (MAIL);
print << "EOF";
To: bar@foobar.com
From: foobar@foo.com
Subject: Order Received
 
$time
 
EOF
The mail gets sent to bar@foobar.com@<host_name>
where <hostname> is the name of the server

Also, what are the correct flags for exim's sendmail accessed from a script like this?

Thanks
Using sendmail from perl on cpanel(exim 4) server

 

 

 

 

Top