title: sending Emails using PEAR's Mail in PHP is working fine on Windows Dev System but not on Linux Server?
body: <p>I am using following code to send email using mail.google</p>
  
  <pre><code>&lt;?php
      require_once "Mail.php";
  
      $from = "someone@somedomain.com";
      $to = "otherone@somedomain.com";
      $subject = "Hi!";
      $body = "Hi,\n\nHow are you?";
  
      $host = "ssl://smtp.gmail.com";
      $port = "465";
      $username = "mygmailaccount@gmail.com";
      $password = "mygmailpassword";
  
      $headers = array ('From' =&gt; $from,
        'To' =&gt; $to,
        'Subject' =&gt; $subject);
      $smtp = Mail::factory('smtp',
        array ('host' =&gt; $host,
          'port' =&gt; $port,
          'auth' =&gt; true,
          'username' =&gt; $username,
          'password' =&gt; $password));
  
      $mail = $smtp-&gt;send($to, $headers, $body);
  
      if (PEAR::isError($mail)) {
        echo("&lt;p&gt;" . $mail-&gt;getMessage() . "&lt;/p&gt;");
       } else {
        echo("&lt;p&gt;Message successfully sent!&lt;/p&gt;");
      }
  </code></pre>
  
  <p>?></p>
  
  <p>This code works fine on Windows Development Machine but not on my Amazon Linux Server ?</p>
  
  <p>Please tell me if any additional configuration is required.</p>