title: PHPMailer not working on 000webhost
body: <p>This code seems to work in Xampp on my mac localhost but it doesn't seem to work on my free 000webhost account. I already tried getting rid of SSL but it didn't help. Keep in mind that this program get variables from an external form.</p>
  
  <pre><code> &lt;?php
      $subject = htmlentities($_POST['subject']);
      $email = $_POST['email'];
      $message = htmlentities($_POST['message']);
  
  
  
  
      require_once 'PHPMailer/PHPMailerAutoload.php';
  
      $m = new PHPMailer;
  
      $m-&gt;isSMTP();
      $m-&gt;SMTPAuth = true;
      //$m-&gt;SMTPDebug = 1;
      $m-&gt;Host = 'smtp.gmail.com';
      $m-&gt;Username = 'email-adress@gmail.com';
      $m-&gt;Password = 'password';
      $m-&gt;SMTPSecure = 'ssl';
      $m-&gt;Port = 465;
  
      $m-&gt;From = 'email-adress@gmail.com';
      $m-&gt;FromName = 'William Green';
      $m-&gt;addReplyTo('email-adress@gmail.com', 'William Green');
  
      //$m-&gt;addCC('email2-address@gmail.com', 'Willliam green');
  
  
      ########################################
      //email code
      //$recipient = strip_tags($_POST['mailRecipient']);
      //$name = strip_tags($_POST['recipientsName']);
  
  
      $m-&gt;addAddress($email, $email);
  
  
  
      //$m-&gt;Subject = strip_tags($_POST['mailSubject']);
      //$m-&gt;Body = strip_tags($_POST['mailBody']);
      $m-&gt;Subject = $subject;
      $m-&gt;Body = $message;
  
  
     //$m-&gt;AltBody = 'plain text version!';
  
  
      ###########################################
  
  
  
  
  
      //var_dump($m-&gt;send());
      if ($m-&gt;send())
      {
      echo '&lt;h1 class="good"&gt;Email Sent!&lt;/h1&gt;';
      }
      else
      {
      echo '&lt;h1 class="bad"&gt;Email Not Sent!&lt;/h1&gt;';
      }
  
  
      ?&gt;
  </code></pre>