I installed postfix and when trying to send mail, I get the followig error:-
fatal: Recipient addresses must be specified on the command line or via the -t option
The code I used to send mail is this:-
<?php
$to = 'myemail@gmail.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
$x = mail($to, $subject, $message, $headers);
var_dump($x);
?>
Can anyone point out what is wrong?
mailsection of yourphp.inifile? It looks like PHP<->mail is misconfigured on this machine. It looks like a-tis missing. – David Schwartz Feb 20 '12 at 4:13grep sendmail php.ini? – adamo Feb 20 '12 at 6:42