PHPMailer不能以简单的形式使用默认的mail()

So I am trying to experiment with phpMailer after using mail(arg) for the last couple of websites but this next site I want to be able to attach a file to an email and I think phpMailer would make it easier to accomplish this.

Right now I have a very simple form and sendmail.php page that doesn't work.

Here's the code...

HTML -----------------------------

  <form role="form" action="_/includes/sendmail.php" enctype="multipart/form-data" method="POST" autocomplete="on">
    <div class="form-group">
        <label class="emph1">First and Last Name:</label>
        <input type="text" class="form-control" id="exampleInputEmail1" placeholder="First and Last Name">
    </div>
    <div class="form-group">
        <label class="emph1">Email Address:</label>
        <input type="email" class="form-control" id="exampleInputPassword1" placeholder="Email">
    </div>
    <div class="form-group">
        <label class="emph1">File/Form Attachments:</label>

        <?php 
        //Maximum file size (in bytes) must be declared before the file input field and can't be large than the setting for
        // upload_max_filesize in php.ini.
        // PHP will stop and compain once file is exceeded
        // 1 mb is actually 1,048,576 bytes.
        ?>

        <input type="hidden" name="MAX_FILE_SIZE" value="5000000"  />
        <input type="file" id="exampleInputFile" name="file_upload">
        <p class="help-block">Please use .jpg, .pdf, or Word based files.</p>
        <p> <?php echo $message;?>
    </div>
    <div class="form-group">
      <label class="emph1">Reason for contacting Derek Davis, PLLC:</label>
      <div class="checkbox">
        <label>Estate Planning<input type="checkbox"></label>
      </div>
      <div class="checkbox">
        <label>Family Law<input type="checkbox"></label>
      </div>
      <div class="checkbox">
        <label>Criminal Defense<input type="checkbox"></label>
      </div>
      <div class="checkbox">
        <label>Collections<input type="checkbox"></label>
      </div>
      <div class="checkbox">
        <label>Landlord-Tenant<input type="checkbox"></label>
      </div>
      <div class="checkbox">
        <label>Other<input id="checkbox-other" type="checkbox"></label>
      </div>

         <!-- jQuery input feature (displays when "other" checkbox is checked) --->

        <div class="form-group" id="input-other" style="display:none;">
            <label class="emph1" for="">If 'other' please specify:</label>
            <input type="text" class="form-control" id="otherProject" name="otherProject" placeholder="Enter short description here." value="" />
        </div>
   </div>

         <!-- End jQuery input feature -->

        <div class="form-group">
        <label class="emph1">Please leave us a brief message:</label>
        <textarea  class="full-width" type="text" name="message" rows="10" placeholder="Please be as specific as possible..." required>
        </textarea><br />     
        </div>
        <button type="submit" class="btn btn-default">Submit</button>
        </form>

PHP --------------------------

<?php ob_start()?>
<?php
function redirect_to($new_location) {
header("Location:" . $new_location);
exit;   
}

require_once("_/includes/phpmailer/class.smtp.php");
require_once("_/includes/phpmailer/class.phpmailer.php");

$mail = new PHPMailer();

if (isset($_POST['message'])){
$body = $_POST['message'];
}
$mail->isMail();
// Set PHPMailer to use the sendmail transport
//Set who the message is to be sent from
//Set an alternative reply-to address
$mail->addReplyTo('jcbbuller@gmail.com', 'First Last');
//Set the subject line
$mail->addAddress('jcbbuller@yahoo.com', 'John Doe');

$mail->Subject = 'PHPMailer sendmail test';
//Replace the plain text body with one created manually
$mail->Body = $body;
$mail->AltBody = 'This is a plain-text message body';
//Attach an image file
//$mail->addAttachment($temp_file, $temp_file_name);

//send the message, check for errors
if ($mail->Send()) {
redirect_to("../../contact.php");
} else {
redirect_to("../../index.html");
}
?>
<?php ob_end_flush(); ?>

I know ideally you would want to set up a SMTP and assign variables the SMTP information but right now I am just trying to get this darn thing to work. I've made a boolean at the end of the php so I at least I know if it did or didn't execute BUT the page doesn't redirect at all... Any suggestion would be welcomed! Thanks

maybe the first thing to do is to check what's going wrong :

try {
    $mail->isMail();
    //....
}
catch (phpmailerException $e) {
    echo $e->errorMessage();
}