PHP Not sent automatic email on remote server <p>I wrote codes that should send auto email using PEAR. every thing is OK on my local MAC OS system but not working on windows based remote server. here is my codes:</p> <pre><code>&lt;?php require_once('../config/connection.php'); include_once("Mail.php"); $id=$_GET['id']; if(isset($_POST['update-visa-status-btn'])){ $status=$_POST['status']; mysqli_query($con,"UPDATE `visa` SET `status`='$status' WHERE `id`='$id'"); $visa=mysqli_query($con,"SELECT * FROM `visa` WHERE `id`='$id'"); $row_visa=mysqli_fetch_assoc($visa); $user_id=$row_visa['userid']; $user_info=mysqli_query($con,"SELECT * FROM `user` WHERE `id`='$user_id'"); $row_user_info=mysqli_fetch_assoc($user_info); $From = "..."; $To="..."; $Subject = "..."; $Message = ' &lt;html&gt; &lt;head&gt; &lt;/head&gt; &lt;body&gt; &lt;!-- SOME HTML CODES THAT MAKES HTML EMAIL BODY --&gt; &lt;/body&gt; &lt;/html&gt;'; $Host = "..."; $Username = "..."; $Password = "..."; $content_type="text/html"; $Headers = array ('From' =&gt; $From, 'To' =&gt; $To, 'Subject' =&gt; $Subject, 'content-type' =&gt; $content_type); $SMTP = Mail::factory('smtp', array ('host' =&gt; $Host, 'auth' =&gt; true, 'username' =&gt; $Username, 'password' =&gt; $Password)); $mail = $SMTP-&gt;send($To, $Headers, $Message); if (PEAR::isError($mail)){ echo($mail-&gt;getMessage()); } else { echo("Email Message sent!"); }} ?&gt; </code></pre> <p>On remote server none of messages success or error not shown &amp; no email sent but on local, every thing works like a charm.Thank you for your help.</p>