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

RSS 订阅当前论坛  

喜悦证交所已经关闭

上一主题 下一主题
     
标题: mail() function 的問題  
 
saxontse (saxontse)
新手上路
Rank: 1
初级会员



UID 63766
精华 0
积分 4
帖子 4
金钱 4 喜悦币
威望 0
人脉 0
阅读权限 10
注册 2005-3-27
状态 离线
mail() function 的問題

我想問mail() function 是否本身要有smtp server 才能用?
因為我寫以下code 的時候出現
"Not Success"

if(mail('saxontse@sinaman.com','Hello:MAN','I am a boy','system@saxontse.no-ip.info'))
{
   echo "Success";
}
else
{
  echo "not success";
}

有誰能解答我的問題??
2005-5-23 11:58 PM#1
查看资料  发短消息  顶部
 
纯粹误会
金牌会员
Rank: 6Rank: 6


UID 63836
精华 0
积分 2194
帖子 2187
金钱 2194 喜悦币
威望 0
人脉 0
阅读权限 70
注册 2005-3-30
状态 离线
[推荐阅读] 请问JavaScript如何将一个表单内的数组值传递给另一个表单内的数组?
Mail函数需上传到PHP空间才能起作用

如果你是宽带请点如下地址查看mail实例
[url]mkMSITStore:http://zh5j.com/dl/php5_manual_zh.chm::/zh/function.mail.html[/url]

<?php
/* recipients */
$to  = "mary@example.com" . ", " ; // note the comma
$to .= "kelly@example.com";

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

/* message */
$message = '
<html>
<head>
<title>Birthday Reminders for August</title>
</head>
<body>
<p>Here are the birthdays upcoming in August!</p>
<table>
<tr>
  <th>erson</th><th>Day</th><th>Month</th><th>Year</th>
</tr>
<tr>
  <td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
</tr>
<tr>
  <td>Sally</td><td>17th</td><td>August</td><td>1973</td>
</tr>
</table>
</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=gb2312\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);
?>




求职深圳。
2005-5-24 01:38 AM#2
查看资料  发短消息  QQ . .   顶部
 
saxontse (saxontse)
新手上路
Rank: 1
初级会员



UID 63766
精华 0
积分 4
帖子 4
金钱 4 喜悦币
威望 0
人脉 0
阅读权限 10
注册 2005-3-27
状态 离线
[推荐阅读] abc
謝謝您的回覆
我的电腦本身已經安裝了apache server
而其他php 的function 亦能夠執行
只是mail() 這個function 不成功
是否需要安裝smtp server 我才能執行mail() 這個function?
如果是的話
有什麼smtp server 可以推介嗎?
謝謝
2005-5-24 11:49 PM#3
查看资料  发短消息  顶部
     


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


 




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

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