fputs($socket,"From:这放发件人姓名<$this->Username>\r\n");
fputs($socket,"Subject:$this->Title\r\n");
fputs($socket,"To:$this->Recipients\r\n");
fputs($socket,"\r\n");
fputs($socket,$this->Content."\r\n");
fputs($socket,"."."\r\n");
fputs($socket,"QUIT\r\n");
$result=fgets($socket);
//echo $result.'<br/>';
fclose($socket);
大家好帮我看看代码,这上网查了N多资料,好像我写的没有错啊。为什么不显示发件人姓名呢。、
我用 [email protected] 向 [email protected] 发邮件的,发件人处显示 <> ,下面显示由 [email protected]代发。是不是smtp.qq.com 就是不让显示?
解决方案 »
- 如果保存2次session的值?
- sql语句,求相同编号的最后一条信息
- 用什么开发工具PHP好
- fsockopen 抓去 google.com 页面出现错误
- 请教:javascript 中 <!-- ->符号!
- 下面的php程序﹐為什么連接上數據庫卻取不到相應字段?請指教~~
- phpMyAdmin 2.6.0和2.5是不是有不兼容的问题?
- 在iframe中的header怎么弹出新的窗口?
- 没有 php_mysql.dll ?
- Notice: Undefined variable: GOLBALS
- Unable to find the socket transport "ssl",tell me why?
- 哪位大神有用php搭建的网站源代码?求分享
From: John Doe <[email protected]>
这儿名字两边都有空格。而且
Subject: 这儿也要有空格隔开会不会是这个原因
$this->socketCmd("AUTH LOGIN".L_CRLF);
$this->socketCmd($this->m_user.L_CRLF);
$this->socketCmd($this->pwd.L_CRLF);
$this->socketCmd("MAIL FROM:".$m_from.L_CRLF);
$this->socketCmd("RCPT TO:<".trim($m_to).">".L_CRLF);
$this->socketCmd("DATA".L_CRLF);
$this->socketCmd($this->m_mail_body.L_CRLF);
$this->socketCmd(".".L_CRLF);
$this->socketCmd("quit".L_CRLF);以上仅供参考。