duanjiu6697 2013-10-26 04:59
浏览 67
已采纳

邮件没有发送到PHP的CC

I am using

    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
);

Mail sent to $to but not sending to $cc

  • 写回答

1条回答 默认 最新

  • duanhui1185 2013-10-26 12:34
    关注

    List all envelope recipients ( "To", "Cc" and "Bcc") in the second parameter:

    $smtp->SendMessage
    (
    $from,
    array($to,$cc),
    ...
    

    My guess it that SendMessage expects to get all recipients in the second parameter.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 求帮我调试一下freefem代码
  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图