title: Sending php form information via gmail smtp using pear mail.php package but I get an error
body: <p>I am trying to send data from a form to an email.  I did the following:</p>
  
  <blockquote>
    <ol>
    <li>Browsed to : <a href="http://pear.php.net/package/Mail/download/1.2.0b5" rel="nofollow">http://pear.php.net/package/Mail/download/1.2.0b5</a></li>
    <li>Downloaded the beta file 1.2.0b5</li>
    <li>Unziped the file and placed in XAMPP htdocs folder</li>
    <li>Created the following code: </li>
    </ol>
  </blockquote>
  
  <pre><code>&lt;?php // Pear Mail Library
  
  require_once "Mail.php";
  $from = '&lt;johannes.gmail.com&gt;';
  $to = '&lt;john.pick@gmail.com&gt;';
  $subject = 'Hi!';
  $body = "Hi,\n\nHow are you?";
  
  $headers = array(
      'From' =&gt; $from,
      'To' =&gt; $to,
      'Subject' =&gt; $subject
  );
  $smtp = Mail::factory('smtp', array(
          'host' =&gt; 'smtp.gmail.com',
          'port' =&gt; '465',
          'auth' =&gt; true,
          'username' =&gt; 'readgreen@gmail.com',
          'password' =&gt; 'bon3dfredds'
      ));
  
  $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;');
  }
  
  ?&gt;
  </code></pre>
  
  <p>but I get the following error: </p>
  
  <blockquote>
    <p>Strict Standards: Non-static method Mail::factory() should not be called statically in C:\xampp\htdocs\Mail Tester\Untitled-1.php on line 22</p>
    
    <p>Strict Standards: Non-static method PEAR::isError() should not be
    called statically, assuming $this from incompatible context in
    C:\xampp\htdocs\Mail Tester\Mail\smtp.php on line 365</p>
    
    <p>Strict Standards: Non-static method PEAR::isError() should not be
    called statically, assuming $this from incompatible context in
    C:\xampp\php\PEAR\Net\SMTP.php on line 339</p>
    
    <p>Strict Standards: Non-static method PEAR::isError() should not be
    called statically, assuming $this from incompatible context in
    C:\xampp\php\PEAR\Net\SMTP.php on line 344 Any help will be greatly
    appreciated</p>
  </blockquote>