喜悦国际村 
» 游客:  注册 | 登录 | 搜索 | 统计 | 帮助

RSS 订阅当前论坛  

喜悦证交所已经关闭

上一主题 下一主题
     
标题: [问题] 注册后发邮件的问题 就是如何用PHP发邮件  
 
53573558
注册会员
Rank: 2



UID 79354
精华 0
积分 109
帖子 88
金钱 109 喜悦币
威望 0
人脉 0
阅读权限 20
注册 2006-8-31
状态 离线
注册后发邮件的问题 就是如何用PHP发邮件

我想让别人注册后,服务器自动发一封邮件到他提交的邮箱中,让他点击确认。才算注册成功了!(就像你们注册这个网站一样) 我有发邮件的类,仍然不行,程序肯定没问题。我不知道该怎么办了???
你们谁知道告诉我呀,到底实现这样的功能需要什么?具体该怎么做???急!
例如像下面这样的页面来发邮件也出错。

<?php
/* recipients */
$to  = "xxx@163.com" . ", " ; // note the comma

/* subject */
$subject = "Birthday Reminders for August";

/* message */
$message = '
<html>
<head>
<title>Birthday Reminders for August</title>
</head>
<body>
...........................
</body>
</html>
';

/* To send HTML mail, you can set the Content-type header. */
$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

/* additional headers */
$headers .= "To: Mary <mary@example.com>, Kelly <kelly@example.com>\r\n";
$headers .= "From: Birthday Reminder <birthday@example.com>\r\n";
$headers .= "Cc: birthdayarchive@example.com\r\n";
$headers .= "Bcc: birthdaycheck@example.com\r\n";

/* and now mail it */
mail($to, $subject, $message, $headers);     //第58行。    //第58行。    //第58行。
?>

错误提示是:
Warning: mail() [function.mail]: SMTP server response: 501 5.5.4 Invalid Address in F:\index\mail.php on line 58




一切都不在我的掌握之中,
不过一切都很顺利!
2006-9-4 05:01 PM#1
查看资料  Blog  发短消息  QQ . .   顶部
 
游戏人间
版主
Rank: 7Rank: 7Rank: 7
☞风云山庄大少爷☜


UID 62639
精华 2
积分 14655
帖子 7758
金钱 14505 喜悦币
威望 20
人脉 130
阅读权限 100
注册 2004-12-21
来自 广西人在北京
状态 离线
[推荐阅读] 怪了MYSQL FLOAT类型字段总是给四舍五入
程序肯定没问题

那你说什么有问题了.




 
群号:6025396/6025252/19520091(广西PHP交流/PHP高级编程/算法交流) 寧可在嘗試中失敗,也不在保守中成功! 不為失敗找理由,只為成功找方法! 饿踢Blog
 
2006-9-4 06:00 PM#2
查看资料  访问主页  Blog  发短消息  顶部
 
刀鱼
版主
Rank: 7Rank: 7Rank: 7
好好做人,认真做事


UID 67208
精华 0
积分 680
帖子 825
金钱 680 喜悦币
威望 0
人脉 0
阅读权限 100
注册 2005-12-15
来自 北京
状态 离线
[推荐阅读] 北京中关村招聘PHP程序开发
Understanding SMTP Error Messages
From Heinz Tschabitscher,
Your Guide to Email.
FREE Newsletter. Sign Up Now!
List of SMTP Server Response Codes
211 - A system status message.
214 - A help message for a human reader follows.








-------------------------------------------
Invalid Address in F:\index\mail.php on line 58    这句就不要多说了...invalid address
220 - SMTP Service ready.
221 - Service closing.
250 - Requested action taken and completed. The best message of them all.
251 - The recipient is not local to the server, but the server will accept and forward the message.
252 - The recipient cannot be VRFYed, but the server accepts the message and attempts delivery.
354 - Start message input and end with <CRLF>.<CRLF>. This indicates that the server is ready to accept the message itself (after you have told it who it is from and where you want to to go).
421 - The service is not available and the connection will be closed.
450 - The requested command failed because the user's mailbox was unavailable (for example because it was locked). Try again later.
451 - The command has been aborted due to a server error. Not your fault. Maybe let the admin know.
452 - The command has been aborted because the server has insufficient system storage.
The following error messages (500-504) usually tell you that your email client is broken. It's probably best to let the program's author know.

500 - The server could not recognize the command due to a syntax error.
501 - A syntax error was encountered in command arguments.
502 - This command is not implemented.
503 - The server has encountered a bad sequence of commands.
504 - A command parameter is not implemented.
550 - The requested command failed because the user's mailbox was unavailable (for example because it was not found, or because the command was rejected for policy reasons).
551 - The recipient is not local to the server. The server then gives a forward address to try.
552 - The action was aborted due to exceeded storage allocation.
553 - The command was aborted because the mailbox name is invalid.
554 - The transaction failed. Blame it on the weather.




有项目需求,请联系:daoyu_06@126.com.
2006-9-4 06:56 PM#3
查看资料  Blog  发短消息  QQ . .   顶部
     


  可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题 | 开通个人空间  


 




Powered by Discuz! 6.1.0  © 2001-2010 Comsenz Inc.
Processed in 0.024538 second(s), 6 queries

(冀ICP备05009913号) 管理员:sadly 邮箱/MSN: sadly@phpx.com QQ:824008(长隐) 清除 Cookies - - Archiver - WAP