I just followed a tutorial and i can send attachments. But the hard coded file path is only can send, i.e;
$mail->AddAttachment("images/pdf/xyz.pdf");
i need to send the any chosen files.I did not get the path of chosen file.Please help me to move on....


Mari Shankari74 reputationPosted Jul 29, 2017, 2:52 AM EDT
Saafia NM20 reputationPosted Jul 29, 2017, 2:56 AM EDT
Mari Shankari74 reputationPosted Jul 29, 2017, 3:21 AM EDT
Kesavan KrishnanRank #3,055 · 471 reputationPosted Jul 30, 2017, 9:33 PM EDT
Gokhul VarmanRank #1,505 · 1.1K reputationPosted Aug 13, 2017, 5:46 AM EDT
Manikandan MurugesanRank #300 · 8.4K reputationPosted Aug 13, 2017, 4:37 PM EDT
You should use one of the classes built for that, for example PEAR mail. For a bit more explanation, assuming we use just a plain text UTF8 content with the PDF file.
uniqboundaryshould be replace by some sort of unique string$fileTypeis the MIME type of your fileHere the code :