Good evening. I'm trying to make an attachment in PhpMailer as follows:
$arquivo = '../enviados/planilha.xlsx';
$mail->AddAttachment($arquivo);
That way, the attachment does not go along with the email. But when I put the path of the direct file in the AddAttachment () function it works:
$mail->AddAttachment('../enviados/planilha.xlsx');
The name of the worksheet always changes, I send the name and its path by post, so I'm playing in a variable. If anyone has any tips I would be grateful.