title: Attaching a file to PHPMailer
body: <p>I am currently working on a project that has files stored in a DB as blobs. I need to attach the file to an e-mail and send it out via PHPMailer. I am familiar with <code>$mail-&gt;addAttachment()</code>, however, this function seems to take in a file path only, which I don't have. I was wondering if there is any way to manipulate the blob and feed to this function ?</p>
  
  <p>I appreciate any suggestions, thanks in advance!</p>
  
  <p>The following successfully creates a 'Save As' dialog of the file I need to attach:</p>
  
  <pre><code>header("Content-disposition: attachment; filename={$filename}.{$file_ext}");
  header("Content-type: application/octet-stream");
  echo $pdf['data'];
  exit;
  </code></pre>