Multiple attachments via phpmailer

I am using the php mailer class to send multiple attachment emails. Two errors come:

The first these two lines appear when sending emails, these errors belong to the class .phpmailer.php:

Deprecated: the set_magic_quotes_runtime () function is deprecated in / var / www / dev 01 / maiarn / class.phpmailer.php on line 1471

Deprecated: the set_magic_quotes_runtime () function is deprecated in / var / www / dev 01 / maiarn / class.phpmailer.php on line 1475 The message has been sent.

The second letter is sent with only one attachment, the second - where:

$mail->AddAttachment("logo.jpg"); // attachment $mail->AddAttachment("logo.jpg"); 

Any help

+6
source share
1 answer

It looks like you are using PHPMailer for PHP4 when you are using PHP5. If you really use PHP5, make sure you have the latest PHPMailer from http://code.google.com/a/apache-extras.org/p/phpmailer/downloads/list

As for attachments, do you attach the same file twice? PHPMailer probably removes duplicates.

+2
source

Source: https://habr.com/ru/post/908641/


All Articles