如何在Linux服务器上运行的PHPMailer中添加CC邮件地址?PHPMailer,CC和Linux服务器
AddCC方法仅适用于Windows:http://phpmailer.worxware.com/index.php?pg=methods
我试着用这种方法,但邮件永远不会到来......我也试图与$ MAIL-> addCustomHeader( 'CC:[email protected]')不成功。
谢谢。
如何在Linux服务器上运行的PHPMailer中添加CC邮件地址?PHPMailer,CC和Linux服务器
AddCC方法仅适用于Windows:http://phpmailer.worxware.com/index.php?pg=methods
我试着用这种方法,但邮件永远不会到来......我也试图与$ MAIL-> addCustomHeader( 'CC:[email protected]')不成功。
谢谢。
当已经有收件人存在时,我在使用PHPMailer的addCC时遇到了问题。为了解决这个问题,由于共享服务器不允许PHPMailer中的邮件功能的安全模式必须被删除。如果你打开错误,你会发现问题来自哪里。
首先回答供参考。 PHPmailer multiple recipients error
我在我的应用程序中添加了一些代码行。我称之为棘手的事情。您可以在您的代码中添加cc,如下所示:
if($ ccList!=“”){ $ ccRecipients = explode(“,”,$ ccList); foreach($ ccRecipients as $ ccRecipient){ $ mailer-> AddCC($ ccRecipient); // $ mailer-> AddAddress($ ccRecipient); } $ mailer-> AddCustomHeader(“Cc:$ ccList”); }
您可以更改代码以满足您的应用需求。
我希望它对你有用:)
谢谢。
欢迎来到SO。什么不行?你得到什么错误信息?你能显示一些代码吗? – 2010-05-04 18:34:59