查看: 1496|回复: 17
|
PHP 的mail function + SMTP configure
[复制链接]
|
|
我已经试了很多天,可是还是没有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 编辑 ] |
|
|
|
|
|
|
|
发表于 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很容易了解。
个人建议使用。 |
|
|
|
|
|
|
|

楼主 |
发表于 2-4-2007 10:32 PM
|
显示全部楼层
|
|
|
|
|
|
|
发表于 2-4-2007 10:56 PM
|
显示全部楼层
|
|
|
|
|
|
|

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

楼主 |
发表于 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
|
显示全部楼层
|
|
|
|
|
|
|
发表于 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... |
|
|
|
|
|
|
| |
本周最热论坛帖子
|