佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 1495|回复: 17

PHP 的mail function + SMTP configure

[复制链接]
发表于 14-3-2007 09:13 AM | 显示全部楼层 |阅读模式

我已经试了很多天,可是还是没有funcion,
各位,可以帮我看看吗?
Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Authentication required Refer http://webmail.tm.net.my/smtpauth.html: green_tea_ochita@hotmail.com in D:\Web\WebServer\Apache2\htdocs\mail_Func.php on line 15

我已经把php.ini的mail function set 成
[mail function]
; For Win32 only.
SMTP = smtp.streamyx.com
smtp_port = 25

; For Win32 only.
;sendmail_from = 我的名@streamyx.com

我的mail_Func.php如下
<?php
function send_password_to_mail($retrieved_Password,$mail_Subject, $user_Email)
{
//ini_set(sendmail_path, "/usr/sbin/sendmail -t -f mimi_shyannee@yahoo.com";
//ini_set(sendmail_from, "我的名@streamyx.com";
//ini_set(SMTP,"smtp.streamyx.com";

$user_Login=$_POST["userLogin"];
$email = $user_Email;
$mail_Subject="Your retrieved password";
$from = "From: Admin@EzyPhotosPrinting.com";
$mesg = "Dear ".$user_Login.",\r\n Your username:".$user_Login."\r\n Your Password:".$retrieved_Password;
$subject = $mail_Subject;

        if(mail($email, $subject,$mesg, $from))
{
        return true;
}

else
{
        return false;
        
}


}

?>

还有一个问题。。。
什么是undefined index?
$user_Login=$_POST["userLogin"];<---这样对吗?

谢谢各位

[ 本帖最后由 memee 于 14-3-2007 09:23 AM 编辑 ]
回复

使用道具 举报


ADVERTISEMENT

发表于 14-3-2007 01:49 PM | 显示全部楼层
要用streamyx的smtp,你需要Authentication,你需要password。
研究研究phpmailer吧。
回复

使用道具 举报

 楼主| 发表于 14-3-2007 04:12 PM | 显示全部楼层

请问有什么smtp可以用又不用Authentication?
password是不是我们申请streamyx时的password?
回复

使用道具 举报

发表于 14-3-2007 05:36 PM | 显示全部楼层
对。
应该除了你自己的smtp,没有不需要Authentication的。
回复

使用道具 举报

 楼主| 发表于 14-3-2007 05:47 PM | 显示全部楼层

那除了php mailer以外。。
我还有什么方法??
回复

使用道具 举报

发表于 29-3-2007 11:31 PM | 显示全部楼层
原帖由 memee 于 14-3-2007 05:47 PM 发表

那除了php mailer以外。。
我还有什么方法??

其实php mailer很容易了解。
个人建议使用。
回复

使用道具 举报

Follow Us
 楼主| 发表于 2-4-2007 10:32 PM | 显示全部楼层
Message was not sentMailer Error: The following From address failed: admin@localhost.com
我试了。。。不可以哦。。。
我要怎样改???
<?php
require("class.phpmailer.php";
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "smtp.email.com"; // SMTP server
$mail->From = "admin@localhost.com";
$mail->AddAddress("shyannee1219@hotmail.com";

$mail->Subject = "first mailing";
$mail->Body = "hi ! \n\n this is First mailing I made myself with PHPMailer !";
$mail->WordWrap = 50;

if(!$mail->Send())
{
   echo "Message was not sent";
   echo "Mailer Error: " . $mail->ErrorInfo;
}
else
{
   echo "Message has been sent";
}
?>
回复

使用道具 举报

发表于 2-4-2007 10:56 PM | 显示全部楼层
原帖由 memee 于 2-4-2007 10:32 PM 发表
Message was not sentMailer Error: The following From address failed: admin@localhost.com
我试了。。。不可以哦。。。
我要怎样改???
<?php
require("class.phpmailer.php" ...

class也许要改。改成适合你server的。
回复

使用道具 举报


ADVERTISEMENT

 楼主| 发表于 2-4-2007 11:02 PM | 显示全部楼层
怎样改?
不好意思,因为刚刚才接触到phpmailer...
可以说明白一点吗??
回复

使用道具 举报

发表于 2-4-2007 11:07 PM | 显示全部楼层
这个
class.phpmailer.php
回复

使用道具 举报

 楼主| 发表于 2-4-2007 11:15 PM | 显示全部楼层
require("class.phpmailer.php");
改这个吗???
改去什么??
回复

使用道具 举报

发表于 3-4-2007 08:54 AM | 显示全部楼层
改class.phpmailer.php里面的内容。
回复

使用道具 举报

发表于 3-4-2007 09:22 AM | 显示全部楼层
你是不是用 windows 和还没在 outlook express set 你的 streamyx mail?
回复

使用道具 举报

 楼主| 发表于 3-4-2007 10:33 AM | 显示全部楼层
怎样说?
不是streamyx 都要 authendificatio吗?
回复

使用道具 举报

发表于 3-4-2007 05:21 PM | 显示全部楼层

回复 #14 memee 的帖子

outlook express 不是可以 set password 了吗?
回复

使用道具 举报

发表于 18-8-2007 12:16 AM | 显示全部楼层
我也有同样的问题
Warning: mail(): SMTP server response: 550 5.7.1 Authentication required Refer guideline http://webmail.tm.net.my/smtpauth.html: xx@tm.net.my in c:\program files\easyphp1-7\www\e-chinese\thank.php on line 45

我已经set了outlook 。。。也依据http://webmail.tm.net.my/smtpauth.htmlEnable 了 SMTP Authentication for Email Client。

phpmailer 也试了,但还是得到以上的result。

请帮帮我!!
回复

使用道具 举报


ADVERTISEMENT

发表于 25-8-2007 04:45 PM | 显示全部楼层
请问如果在LOCALHOST里设置SMTP的话,应该怎样?
我在httpd.conf里打了
NameVirtualHost *:80
NameVirtualHost *:25

<VirtualHost *:80>
ServerName localhost
# your webserver configuration here
</VirtualHost>

<VirtualHost *:25>
ServerName localhost # or whatever desired
SmtpProtocol On
# addition mod_smtpd or associated plugin configuration here
</VirtualHost>

但是Apache启动不了..
红色那行有error: ServerName takes one argument, The hostname and port of the server
应该要如何更改呢?请各位大大帮忙...
回复

使用道具 举报

发表于 26-8-2007 12:35 AM | 显示全部楼层
我现在SMTP连接到了,但出现个SMTP server response: 503,这是什么东东?还有想请教在OUTLOOK EXPRESS下设置localhotst mail serve的步骤,可能我的设置错了才有那个WARNING...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 15-9-2025 02:26 PM , Processed in 0.125432 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表