I am generating pdf file using dompdf whose filename keeps changing as I have assigned a variable in dompdf stream output and this filename always remains as unique filename.
I want to attach a file in my mail where I am using phpmailer.
Problem:
Able to attach file properly if I assign a particular file name in phpmailer as static file(with particular name assigned), but not getting successful for dynamic files (using variable as below). Here, $attach
is my php variable for file name.
Trying out below code:
$dompdf->stream($attach);//Code for dompdf
$mail->AddAttachment('C:\Downloads\$attach.pdf'); //code for phpmailer to attach file