I have used a PHP code for Mailing using a SMTP HOST as given below:
ini_set('SMTP','myserver');
ini_set('smtp_port',25);
$to = $email;
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";
$headers .= "From: NO-REPLY<no-reply@mydomain.com>" . "\r\n";
$subject = "Confirmation For Request";
$message = '<html>
<body>
<p>Hi '.$firstname.' '.$lastname.'</p>
<p>
We recieved below details from you. Please use given Request/Ticket ID for future follow up:
</p>
<p>
Your Request/Ticket ID: <b>'.$ticketID.'</b>
</p>
<p>
Thanks,<br>
'.$team.' Team.
</p>
</body>
</html>';
mail( $to, $subject, $message, $headers );
Now When i execute the code in Windows Localhost.. I am succcesfully recieving the mail whereas, If I deply the same code on my Linux setup, I do not recieve anymail, though the mail() function returns true in linux machine as well....
On looking into the phpinfo for both windows localhost and Linux server, for mail parameters I found a single difference,
In Windows I found sendmail_path == "No Value", whereas on linux server it says, "usr/sbin/sendmail -t -i"
Could some one help me to resolve this issue?
NOTE: In windows, its a WAMP setup, whereas Linux is a Dedicated server...