hello...
i am doing mail concepts. in this i want to send a dynamic attachments with email. actually user gets email with attachment. this attachment will be dynamic. how to create dynamic attachment for email.i tried this. but no use. anybody help.
i have 'attachments.txt'file with content
User Name: <<name>>
Designid:<<designid>>
Designname:<<designname>>
Orderid:<<orderid>>
i was updated this file as
$myfile = "attachments.txt";
$fh = fopen($myfile, 'w') or die("can't open file");
$stringData = str_replace("<<name>>", $fetuser[firstname], $fh);
//echo $fetuser[firstname];exit;
fwrite($fh, $stringData);
$stringData = str_replace("<<designid>>",$_SESSION[designid], $fh);
fwrite($fh, $stringData);
$stringData = str_replace("<<designname>>", $fetch_designname[designtype], $fh);
fwrite($fh, $stringData);
$stringData = str_replace("<<orderno>>", $ordno, $fh);
fwrite($fh, $stringData);
fclose($fh);
finally i was added attachment in mail like this $mail->AddAttachment("$myfile");
but this is not working properly. anybody help.