本文介绍了通过phpmailer的多个附件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用php mailer类发送多个附件邮件.我遇到了两个错误:

I am using php mailer class to send multiple attachment mails. Two error are coming my way:

首先这两行出现在发送电子邮件时,这些错误来自class.phpmailer.php:

First these two lines apear when email is sended, these errors are from class.phpmailer.php:

已弃用:函数set_magic_quotes_runtime()已弃用 第1475行的/var/www/dev01/maiarn/class.phpmailer.php消息具有 已发送.

Deprecated: Function set_magic_quotes_runtime() is deprecated in /var/www/dev01/maiarn/class.phpmailer.php on line 1475 Message has been sent.

第二电子邮件仅发送一个附件,第二个发送至:

SecondThe email is sent with only one attachment, The second goes where:

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

任何帮助

推荐答案

运行PHP5时似乎正在使用PHPMailer for PHP4.如果您确实在运行PHP5,请确保您具有 http://code.google.com/a/apache-extras.org/p/phpmailer/downloads/list

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

至于附件,您是否两次附加相同的文件? PHPMailer可能正在删除重复项.

As for the attachments, you are attaching the same file twice? PHPMailer is probably removing duplicates.

这篇关于通过phpmailer的多个附件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 18:56