Steve Nagy - 2014-11-03 18:12:49
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?
Manuel Lemos - 2014-11-03 22:24:08 - In reply to message 1 from Steve Nagy
Sure, 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 Lemos
Just to be sure, there would be no file, just a variable containing a pdf image. What would the array look like?
Manuel Lemos - 2014-11-04 04:52:55 - In reply to message 3 from Steve Nagy
It could be something like this:
$part = array(
Steve Nagy - 2014-11-04 14:33:15 - In reply to message 4 from Manuel Lemos
Worked like a charm. Thanks Manuel!