I need to send a pdf file as an attachment to the FAX gateway using phpMailer. If this letter has a body, the fax will have a second page with this text.
Saying:
$mail->Body = "";
php Mailer returns Message body empty
How to get phpMailer to send messages without body message?
Here is the full code
$mail = new PHPMailer();
$emailto = $_POST['sendto'].'@gateway.provider.xy';
$pdf_filename = 'PDF_list_'.date('dmY').'.pdf';
$mail->From = $fmail;
$mail->FromName = $row_firma['company'];
$mail->AddAddress($emailto);
$mail->AddAttachment($pdf_filename);
$mail->Subject = "Subject";
$mail->Body = "";
$mail->AltBody = "";
$mail->Send();
source
share