title: PHPmailer sending attachment file with unknown format
body: <pre><code>&lt;?php
  $file           =   $_FILES["file"]["tmp_name"];
  $file1          =   $_FILES["file1"]["tmp_name"];
  
  $attachment_path    =   $file;
  $attachment_path1   =   $file1;
  
  $body   = "some text";
  
  include("class.phpmailer.php");
  
  //Create a new PHPMailer instance
  $mail = new PHPMailer();
  //Set who the message is to be sent from
  $mail-&gt;SetFrom('mail@example.com', $username);
  //Set who the message is to be sent to
  $mail-&gt;AddAddress('mail@example.com', 'Ticket Relief');
  //Set the subject line
  $mail-&gt;Subject = 'Inquiry from website by Form Fillup';
  //Replace the plain text body with one created manually
  $mail-&gt;Body = $body;
  //Attach an image file
  $mail-&gt;AddAttachment($attachment_path, "attachment1", "base64", "application/octet-stream");
  $mail-&gt;AddAttachment($attachment_path1, "attachment1", "base64", "application/octet-stream");
  
  //Send the message, check for errors
  if(!$mail-&gt;Send()) {
    echo "Mailer Error: " . $mail-&gt;ErrorInfo;
  } else {
    echo "Email has been sent! Please &lt;a href='index.php'&gt;Click Here &lt;/a&gt; to go back to home page";
  }
  </code></pre>
  
  <p>?></p>
  
  <p>and html code</p>
  
  <pre><code>&lt;form action="functions.php" method="post" enctype="multipart/form-data"&gt;
  
                     &lt;div class="outer1"&gt;
                          &lt;label&gt; Please Choose File&lt;/label&gt;
                          &lt;input type="file" class="span4" name="file"&gt;
                      &lt;/div&gt;
                      &lt;div class="outer1"&gt;
                          &lt;label&gt; Please Choose File&lt;/label&gt;
                          &lt;input type="file" class="span4" name="file1"&gt;
                      &lt;/div&gt;                     
                     &lt;div class="outer1"&gt;
                          &lt;input type="submit" class="submit btn btn-success btn-large pull-right" value="Submit"&gt;
                     &lt;/div&gt;
                  &lt;/form&gt;         
  </code></pre>
  
  <ol>
  <li>I am receiving email but cannot open attached file. its in unknown format.</li>
  <li>if file is more than 200kb then its take 40-45 sec to send mail and if its more than 600kb it takes more than 1 min to process</li>
  </ol>
  
  <p>need help on these issues</p>