title: Send completed PDF with PHPMailer without saving
body: <p>I am new to php and have been learning on the fly as I build pages.  My current task is to be able to open a PDF in browser, complete the form, and submit the form upon clicking a button at the bottom of the form.</p>
  
  <p>We would like the completed form to be sent without having to save a copy to the server.  Having a two form cycle would not be horrible though.</p>
  
  <p>I currently am able to send an email, but the script only sends the blank document.</p>
  
  <pre><code>&lt;?php
  
  require("class.phpmailer.php");
  
  $mail = new PHPMailer();
  
  $mail-&gt;IsSMTP();  // telling the class to use SMTP
  $mail-&gt;Host     = "xxx.xxx.xxx"; // SMTP server
  
  $mail-&gt;From     = "xxx@xxx.xxx";
  $mail-&gt;AddAddress("xxx@xxx.xxx");
  
  $mail-&gt;Subject  = "Attachment Test";
  $mail-&gt;Body     = "Hi! \n\n This is my first e-mail sent through PHPMailer.";
  $mail-&gt;WordWrap = 50;
  $mail-&gt;AddAttachment('tshirtorderform.pdf');
  
  if(!$mail-&gt;Send()) {
    echo 'Message was not sent.';
    echo 'Mailer error: ' . $mail-&gt;ErrorInfo;
  } else {
    echo 'Message has been sent.';
  }
  ?&gt;
  </code></pre>
  
  <p>I realize that I am telling it to retrieve the blank document, but I am coming up empty on how to attach the completed form.</p>
  
  <p>Thanks.</p>