i'm Using livedoc to create a pdf. I've suceeded in doing so without saving the file to the server, and thats the objective here.
Can I attach the file I've created which is on a variable via phpmailer and email it.
require("php_mailer/phpmailer.inc.php");
$mail = new phpmailer;
$mail->From = "noreply@credireto.com";
$mail->FromName = "Crédireto";
$mail->Host = "smtp1.site.com;smtp2.site.com"; // specify main and backup server
$mail->AddAddress("$email"); // name is optional
$mail->WordWrap = 50; // set word wrap
$mail->AddAttachment("$data","Simulação.pdf"); // add attachments
$mail->IsHTML(true); // set email format to HTML
$mail->Subject = "Simulação Crédireto";
$mail->Body = filegetcontents("emailagradecimento");
$mail->Send(); // send message
The variable $data contains the file I want to send.