|  | 
  Steve Nagy - 2014-11-03 18:12:49Hi,
 First off, this is a great package and we love using it.
 
 We currently send messages with a pdf attachment generated with HTML2PDF. The file is written to a temp directory and then this file is added to the e-mail message. Is it possible to create an attachment part directly from the contents of a PHP variable an, if so, how?
 
 Thanks,
 Steve Nagy
  Manuel Lemos - 2014-11-03 22:24:08 - In reply to message 1 from Steve NagySure, when you call AddFilePart, you can pass the parameters array with an entry named Data that should pass the string of content data of your file.
  Steve Nagy - 2014-11-03 22:49:30 - In reply to message 2 from Manuel LemosHi Manuel,
 Just to be sure, there would be no file, just a variable containing a pdf image. What would the array look like?
 
 Thanks,
 Steve
  Manuel Lemos - 2014-11-04 04:52:55 - In reply to message 3 from Steve NagyIt could be something like this:
 $part = array(
 'Data'=>$pdf_data,
 'Name'=>'some-document.pdf',
 'Content-Type'=>'application/pdf'
 );
 
  Steve Nagy - 2014-11-04 14:33:15 - In reply to message 4 from Manuel LemosWorked like a charm. Thanks Manuel! |