I use Phpmailer to send emails, but have a problem with sending an attachment. I tried this:
$mail->AddAttachment($_SERVER[DOCUMENT_ROOT].'/test.pdf','doklad.pdf');
and this:
$mail->AddAttachment($_SERVER[DOCUMENT_ROOT].'/test.pdf','doklad.pdf','base64','application/pdf');
and this:
$mail->AddStringAttachment(file_get_contents($_SERVER[DOCUMENT_ROOT].'/test.pdf'),'doklad.pdf','base64','application/pdf');
Phpmailer always sends an attachment but no physical file.
Can you help me to solve it?