I have the following function to send a mail in my php application where it works fine when I tested in localhost
using Test Mail Server Tool. But when I hosted my application on server (byethost.com) the successful message comes up but I never receive the mail. Hope somebody could help me.
function sendPaymentApprovalMailToPayee($to,$receiver,$payno,$amount)
{
$from = $_SESSION['accemail'];
$subject = "Payment Approved #'".$payno."'";
$message = "<p>Dear ".$receiver." ,</p>
<p>We are sending this mail to confirm that the payment of ".$amount." (Pay No : #".$payno." ) has been approved and successfully transferred to your account.</p>
<p>Thanks & Best Regards,<br> Online Payment System - Team.</p>";
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
//send email
return mail($to, $subject, $message, "From:" . $from,$headers);
}