title: phpmailer sending mail
body: <p>I am using phpmailer class to send email and i am attaching a file to the mail.
  The email is sent successfully but the attachment which is an sql file is empty which should not be the case. I have tried with an image file, but it seems that every file that i attach is empty.
  Can anyone help me solve this problem please?</p>
  
  <pre><code>$mail = new PHPMailer();
      $body = "Reminder";
      $mail-&gt;IsSMTP();  
      $mail-&gt;Host       = "mail.yourdomain.com";  
      $mail-&gt;SMTPDebug = 1;  
  
      $mail-&gt;SMTPAuth = true;  
      $mail-&gt;SMTPSecure = "ssl";  
      $mail-&gt;Host = "smtp.gmail.com";  
      $mail-&gt;Port = 465;  
      $mail-&gt;Username = "abc@gmail.com";  
      $mail-&gt;Password = "abc";              
     $mail-&gt;SetFrom('abc@gmail.com',
    'blbla');
     $mail-&gt;AddReplyTo("name@yourdomain.com","First Last");
     $mail-&gt;Subject = "Your order has been successfully placed"
     $mail-&gt;MsgHTML($body);
     $mail-&gt;AddAddress("xyz@live.com","xyz");
     $mail-&gt;AddAttachment("D:\b2\shop3.sql","shop3.sql");
  </code></pre>
  
  <p>UPDATE: I have tried to display the size of the file before attaching it, and it actually displays the file size. Can anyone help me please?</p>