我正在使用
require("smtp-mail/smtp.php");
$from = "abc@abcd.com";
$cc = 'test@test.com';
$to = 'xyz@xyz.com';
$smtp = new smtp_class;
$smtp->host_name = "localhost";
$smtp->host_port = 25;
$smtp->ssl = 0;
$smtp->start_tls = 0;
$smtp->localhost = "localhost";
$smtp->direct_delivery = 0;
$smtp->timeout = 10;
$smtp->data_timeout = 0;
$smtp->debug = 0;
$smtp->html_debug = 0;
$smtp->pop3_auth_host = "";
$smtp->user = "";
$smtp->realm = "";
$smtp->password = "";
$smtp->workstation = "";
$smtp->authentication_mechanism="";
if($smtp->direct_delivery)
{
if(!function_exists("GetMXRR"))
{
$_NAMESERVERS = array();
include("smtp-mail/getmxrr.php");
}
}
$smtp->SendMessage
(
$from,
array($to),
array
(
"MIME-Version: 1.0",
"From: 'IndianMoney.com'<test@test.com>",
"Cc: $cc",
"Content-type: text/html; charset=iso-8859-1",
"To: $to",
"Subject:". $mailSubject,
"Date: ".strftime("%a, %d %b %Y %H:%M:%S %Z")
),
$mailBody
);
邮件发送到$ 但不发送给$ cc
答案 0 :(得分:4)
在第二个参数中列出所有信封收件人(“收件人”,“抄送”和“密送”):
$smtp->SendMessage
(
$from,
array($to,$cc),
...
我猜想SendMessage希望在第二个参数中获得所有收件人。