title: PHPMailer Mail Error - >SMTP connect()
body: <p>I don't know why I get this error <code>PHPMailer  Mail Error - &gt;SMTP connect()</code>. How can I solve it? I don't have any idea how can I do I need exactly explications, I'm new with PHP </p>
  
  <pre><code>&lt;?php
      require '../plugins/phpmailer/PHPMailerAutoload.php';
      $mail = new PHPMailer();
      $mail-&gt;CharSet = "utf-8";
      $mail-&gt;IsSMTP();
      $mail-&gt;SMTPDebug = 1;
      $mail-&gt;SMTPAuth = true;
      $mail-&gt;Username = "myemail@gmail.com";
      $mail-&gt;Password = "mypass";
      $mail-&gt;SMTPSecure = "ssl";
      $mail-&gt;Host = "smtp.gmail.com";
      $mail-&gt;Port = "587";
  
      $mail-&gt;setFrom('your_gmail@gmail.com', 'your name');
      $mail-&gt;AddAddress('to_mail@mail.com', 'receivers name');
  
      $mail-&gt;Subject = 'using PHPMailer';
      $mail-&gt;IsHTML(true);
      $mail-&gt;Body = 'Hi there ,
                              &lt;br /&gt;
                              this mail was sent using PHPMailer...
                              &lt;br /&gt;
                              cheers... :)';
  
      if ($mail-&gt;Send()) {
          echo "Message was Successfully Send :)";
      } else {
          echo "Mail Error - &gt;" . $mail-&gt;ErrorInfo;
      }
      ?&gt;
  </code></pre>