title: HOW TO: Send mail with PHPMailer class or PHPMailerAutoload?
body: <p><strong>first</strong>:  Im traying to send a simple email without attachment with PHPMailer class <br><br>
  <strong>second</strong>: The code i have is not working with 
  require('../libs/PHPMailer/class.phpmailer.php'); //here is throwing me a fatal error</p>
  
  <p><a href="https://i.stack.imgur.com/pg2NG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pg2NG.png" alt="enter image description here"></a></p>
  
  <p><strong>third</strong>:  I already tried with the PHPMailerAutoload class <br><br>
        <strong>require('../libs/PHPMailer/PHPMailerAutoload.php');</strong> // here it doesnt throw any error, but is not sending me anything</p>
  
  <pre><code>&lt;?php
  require('../libs/PHPMailer/class.phpmailer.php');
  
  echo $_POST['InputName'];
  echo $_POST['InputEmail'];
  echo $_POST['InputMessage'];
  
  if(!isset($_POST['InputName']) || 
      !isset($_POST['InputEmail']) || 
      !isset($_POST['InputMessage'])) {
  
      died('We are sorry, but there appears to be a problem with the form you submitted.');
  }
  
  $inputName = $_POST['InputName'];  
  $inputEmail = $_POST['InputEmail'];  
  $inputMessage = $_POST['InputMessage']; 
  $error_message = "";
  
  $mail=new PHPMailer();
  $mail-&gt;CharSet = 'UTF-8';
  
  $mail-&gt;IsSMTP();
  $mail-&gt;Host       = 'mail.domain.com.mx';
  
  $mail-&gt;SMTPSecure = 'tls';
  $mail-&gt;Port       = 465;
  $mail-&gt;SMTPDebug  = 1;
  $mail-&gt;SMTPAuth   = true;
  
  $mail-&gt;Username   = 'contact@domain.com.mx';
  $mail-&gt;Password   = 'mypassword';
  
  $mail-&gt;SetFrom($inputEmail, 'something here');
  // $mail-&gt;AddReplyTo('no-reply@mycomp.com','no-reply');
  $mail-&gt;Subject    = 'CONTACT '.$inputEmail;
  $mail-&gt;MsgHTML($inputMessage);
  
  $mail-&gt;AddAddress('contact@domain.com.mx', 'contact');
  $mail-&gt;AddAddress('other@domain.com.mx', 'other'); /* ... */
  
  // $mail-&gt;AddAttachment($fileName);
  $mail-&gt;send(); 
  </code></pre>
  
  <p>?></p>