title: PHPmailer how to show message
body: <p>How I can show success message after to click send in my form? my phpmailer is working but I want to also after to click send to redirect to my homepage (index.html) and show my message div. This is my php code.</p>
  
  <pre><code>&lt;?php
  require 'phpmailer/PHPMailerAutoload.php';
  
  $mail = new PHPMailer;
  
  $subject = $_POST['subject'];
  $name = $_POST['name'];
  $email = $_POST['email'];
  $message = $_POST['message'];
  
  //$mail-&gt;SMTPDebug = 3;                               // Enable verbose debug output
  
  $mail-&gt;isSMTP();                                      // Set mailer to use SMTP
  $mail-&gt;Host = 'mail.xxxxxxx.pl';  // Specify main and backup SMTP servers
  $mail-&gt;SMTPAuth = true;                               // Enable SMTP authentication
  $mail-&gt;Username = 'xxxxx@xxxxxxxx.pl';                 // SMTP username
  $mail-&gt;Password = 'password';                           // SMTP password
  $mail-&gt;SMTPSecure = 'tls';                            // Enable TLS encryption, `ssl` also accepted
  $mail-&gt;Port = 587;                                    // TCP port to connect to
  
  $mail-&gt;setFrom($email, $name);
  $mail-&gt;addAddress('xxxx@gmail.com', 'xxxxxxxx');     // Add a recipient              // Name is optional
  
  $mail-&gt;isHTML(true);                                  // Set email format to HTML
  
  $mail-&gt;Subject = $subject;
  $mail-&gt;Body    = 'Body test';
  
  
  if(!$mail-&gt;send()) {
      echo 'Message could not be sent.';
      echo 'Mailer Error: ' . $mail-&gt;ErrorInfo;
  } else {
     header('Location: index.html');
  
  }
  </code></pre>
  
  <p>And this is my Jquery code to show/hidden div succes:</p>
  
  <pre><code>$('.box-up').animate({top : 150}, 'normal').delay(3000).animate({top : -500}, 'normal');
  </code></pre>