I have a PHP simple code which supposed to send an email, but it seems it does not work since I have never received any mail. Well I have a free free host and domain with CPanel that I have a Webmail feature there, I can send email through that to wherever I want (Yahoomail, Gmail, ..). I really do not know how to solve it. Here is my php code:
$to = 'sample@yahoo.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: sample@sample.com' . "\r\n" . 'Reply-To: sample@sample.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);`
My sendmail_path /usr/local/bin/phpsendmail
, Path to sendmail /usr/local/bin/phpsendmail
, SMTP localhost, smtp_port 25