PHPMailer 中的多个图像附件
我正在使用 PHPMailer 类,它不支持多个图像上传。
$mailer = new phpmailer();
$mailer->IsMail();
$mailer->Subject = 'NewsLetter Request';
$mailer->AddAddress('myemailid', 'Name');
$mailer->message_type = "attachments";
$mailer->AddAttachment($_FILES["logo"]["tmp_name"],$_FILES["logo"]["name"]);
$mailer->AddAttachment($_FILES["logo2"]["tmp_name"],$_FILES["logo2"]["name"]);
$mailer->Body = $htmlBody;
$mailer->isHTML(true);
如果我发送邮件,我会得到最后一个附加图像 $_FILES['logo2'] ,我不会收到邮件中的第一张图像。
i am using PHPMailer class , it doesn't support multiple image upload.
$mailer = new phpmailer();
$mailer->IsMail();
$mailer->Subject = 'NewsLetter Request';
$mailer->AddAddress('myemailid', 'Name');
$mailer->message_type = "attachments";
$mailer->AddAttachment($_FILES["logo"]["tmp_name"],$_FILES["logo"]["name"]);
$mailer->AddAttachment($_FILES["logo2"]["tmp_name"],$_FILES["logo2"]["name"]);
$mailer->Body = $htmlBody;
$mailer->isHTML(true);
If i send the mail i getting the last attached image that is $_FILES['logo2'] , i am not getting the first image in the mail .
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用的是邮件程序 v5,请参阅此解决方案 多个附件不支持 PHPmailer v5< /a>
See this solution if you are using mailer v5 Multiple attachments not going with PHPmailer v5