PHP邮件类问题

来源:百度知道 编辑:UC知道 时间:2024/09/21 02:41:59
15-9.php
http://hi.baidu.com/kjih/blog/item/5bfc8d8f21dd9be6f01f36d0.html这里
太长了写不下

<?php
include ("./15-9.php");
$mail = new sendmail();
$email = "您好,这是一个测试邮件!";
$sendmail = $mail->send_mail("202.106.187.156", "1986208lkj", true); //显示调示信息
if($mail->send("hj19860317@sina.com", "hj19860317@sina.com", "测试SOCKET邮件", $email)) {
echo "发送成功!<br>";
}else{
echo "发送失败!<br>";
}
?>
这里哪里错了

返回什么错误先?如果是这行出错if($mail->send("hj19860317@sina.com", "hj19860317@sina.com", "测试SOCKET邮件", $email)) { 那就有可能是不能直接使用返回值的问题,你改成这样就行了
$_sendStatus = $mail->send("hj19860317@sina.com", "hj19860317@sina.com", "测试SOCKET邮件", $email);
if($_sendStatus) {