$headers="From:[email protected]\r\n"; $headers.="Reply-To:[email protected]\r\n"; $headers.="Content-type: text/plain;\r\n charset=iso-8859-1\r\n"; mail("[email protected]","this is a 标题","这是文本内容",$headers); echo "文件执行"
按楼主的意思 ,mail() 应为 4 个参数,你怎么只写了3个,定义了一大堆,没有使用啊
用的是php函数的话,直接在php.ini里配置,
$headers="From:[email protected]\r\n"; $headers.="Reply-To:[email protected]\r\n"; $headers.="Content-type: text/plain;\r\n charset=iso-8859-1\r\n"; mail("[email protected]","this is a 标题","这是文本内容");你没把定义的$headers传进mail()应该是mail("[email protected]","this is a 标题","这是文本内容", $headers);
$mail->CharSet = "utf-8";
$mail->From = "[email protected]";
$mail->FromName = "test";
...
看例子
$headers="From:[email protected]\r\n";
$headers.="Reply-To:[email protected]\r\n";
$headers.="Content-type: text/plain;\r\n charset=iso-8859-1\r\n";
mail("[email protected]","this is a 标题","这是文本内容",$headers);
echo "文件执行"
按楼主的意思 ,mail() 应为 4 个参数,你怎么只写了3个,定义了一大堆,没有使用啊
$headers.="Reply-To:[email protected]\r\n";
$headers.="Content-type: text/plain;\r\n charset=iso-8859-1\r\n";
mail("[email protected]","this is a 标题","这是文本内容");你没把定义的$headers传进mail()应该是mail("[email protected]","this is a 标题","这是文本内容", $headers);