I am using following code for send mail but it through msg "Null message body; hope that's ok " and mail is not send
$body='sdfsdf';
$subject='sdfsdf';
$to='[email protected]';
echo $output = shell_exec("echo $body && mail -s \"$subject\" $to");
print_r ("$output");
die;
&&? I think it should beshell_exec("echo \"$body\" | mail -s \"$subject\" $to");