将邮件发送到本地邮件服务器 - “SENT:550该地址无效”。 [英] Sending mail to local mail server - "SENT: 550 The address is not valid."
问题描述
我正在尝试将邮件发送到我的本地邮件服务器。我正在使用 hMailServer 作为邮件服务器,我已经按照这里所述进行了配置:
在XAMPP上设置本地邮件(SMTP,POP3,IMAP)服务器
但是当我尝试发送邮件时,我收到这个错误:
(!)警告:mail()[function.mail]:SMTP服务器响应:550
地址无效。在C:\wamp\www\kariyersitem\register.php行
161
日志文件邮件服务器显示此错误如下:
DEBUG31082012-01-08 18:04:24.447创建会话14
SMTPD3108 142012-01-08 18:04:24.448127.0.0.1SENT:220 localhost ESMTP
SMTPD1728 142012-01 -08 18:04:24.454127.0.0.1收到:HELO olcay-pc
SMTPD1728 142012-01-08 18:04:24.455127.0.0.1SENT: 250你好。
SMTPD3108 142012-01-08 18:04:24.457127.0.0.1RECEIVED:MAIL FROM:< you @ yourdomain>
SMTPD3108 142012-01-08 18:04:24.458127.0.0.1SENT:550地址无效。
SMTPD2040 142012-01-08 18:04:24.459127.0.0.1Received:QUIT
SMTPD2040 142012-01-08 18:04: 24.460127.0.0.1SENT:221再见
DEBUG33922012-01-08 18:04:24.461关闭TCP / IP插座
DEBUG33922012 -01-08 18:04:24.462结束会话14
我已经检查过地址,我确定这是正确的。
任何人都可以告诉我有什么问题?
这里我的邮件代码:
$ to = $ frm_kadi;
$ subject = $ site_title。'ÜyelikAktivasyonu';
$ message ='hello';
$ headers ='From:'。$ contact。\r\\\
。'Reply-To:'。$ contact。\r\\\
。'X-Mailer:PHP / .phpversion();
$ mresult = mail($ to,$ subject,$ message,$ headers);
我已经检查了 $ contact
在我的 config.php
文件中写为 olcayertas@gmail.com
。在发送邮件之前,我使用echo函数来调试我的代码,这是正确的。
目前我的$ contact变量设置为:
$ contact =olcayertas@gmail.com;
更新1
在
php.ini $中设置 sendmail_from
到 olcayertas@gmail.com
c $ c> as @Jared Farrish建议解决了第一个问题。但现在我有一个新问题: DEBUG31082012-01-08 22:15:28.497创建会话24
SMTPD3108 242012-01-08 22:15:28.498127.0.0.1SENT:220 localhost ESMTP
SMTPD3108 242012-01- 08 22:15:28.499127.0.0.1已接收:HELO olcay-pc
SMTPD3108 242012-01-08 22:15:28.500127.0.0.1SENT:250你好。
SMTPD4380 242012-01-08 22:15:28.511127.0.0.1RECEIVED:MAIL FROM:< olcayertas@gmail.com&
DEBUG43802012-01-08 22:15:28.542垃圾邮件总数:0
SMTPD4380 242012-01-08 22:15:28.547127.0 .0.1SENT:250 OK
SMTPD3108 242012-01-08 22:15:28.548127.0.0.1Received:RCPT TO:< olcayertas>
SMTPD3108 242012-01-08 22:15:28.548127.0.0.1SENT:550需要一个有效的地址。
SMTPD2040 242012-01-08 22:15:28.552127.0.0.1Received:QUIT
DEBUG20402012-01-08 22:15:28.552 删除消息文件
SMTPD2040 242012-01-08 22:15:28.552127.0.0.1SENT:221再见
DEBUG43802012-01 -08 22:15:28.555关闭TCP / IP插座
DEBUG43802012-01-08 22:15:28.556结束会议24
看起来它完全没有获得目标地址。我正在尝试发送邮件给自己,但只能使用用户名 olcayertas
并且缺少域名 @ gmail.com
。 p>
更新2
我已经解决了第二个问题。这是我的错误
更新3
现在我收到此错误:
SENT:530 SMTP验证是必需的。
但是我已经在 Settings-> Ptotocols- > SMTP->电子邮件的传送 - > SMTP中继服务器。 服务器需要身份验证
和使用SSL
otions checked。
更新4
禁用需要SMPTP身份验证
设置 - >高级 - > IP范围 - >我的Compter
解决SMTP验证问题。
解决方案要解决 SENT:550550该地址无效。
问题,您必须将 sendmail_from
设置为有效邮件地址在 php.ini
文件中。
要解决 SENT:530 SMTP验证是必需的
问题,打开hMailServer Administrator。转到设置 - >高级 - > IP范围 - >我的压缩器。禁用需要SMTP验证部分下的所有选项。
I am trying to send mail to my local mail server. I am using hMailServer as mail server and I have configured it as mentioned here:
Setting up local Mail (SMTP, POP3, IMAP) Server on XAMPP
But when I try to send mail I am getting this error:
( ! ) Warning: mail() [function.mail]: SMTP server response: 550 The
address is not valid. in C:\wamp\www\kariyersitem\register.php on line
161
Log files of the mail server indicates this error as below:
"DEBUG" 3108 "2012-01-08 18:04:24.447" "Creating session 14"
"SMTPD" 3108 14 "2012-01-08 18:04:24.448" "127.0.0.1" "SENT: 220 localhost ESMTP"
"SMTPD" 1728 14 "2012-01-08 18:04:24.454" "127.0.0.1" "RECEIVED: HELO olcay-pc"
"SMTPD" 1728 14 "2012-01-08 18:04:24.455" "127.0.0.1" "SENT: 250 Hello."
"SMTPD" 3108 14 "2012-01-08 18:04:24.457" "127.0.0.1" "RECEIVED: MAIL FROM:<you@yourdomain>"
"SMTPD" 3108 14 "2012-01-08 18:04:24.458" "127.0.0.1" "SENT: 550 The address is not valid."
"SMTPD" 2040 14 "2012-01-08 18:04:24.459" "127.0.0.1" "RECEIVED: QUIT"
"SMTPD" 2040 14 "2012-01-08 18:04:24.460" "127.0.0.1" "SENT: 221 goodbye"
"DEBUG" 3392 "2012-01-08 18:04:24.461" "Closing TCP/IP socket"
"DEBUG" 3392 "2012-01-08 18:04:24.462" "Ending session 14"
I have checked address and I am sure it is correct.
Can anyone tell me what is the problem?
Here my mail code:
$to = $frm_kadi;
$subject = $site_title.' Üyelik Aktivasyonu';
$message = 'hello';
$headers = 'From: '.$contact."\r\n".'Reply-To: '.$contact."\r\n".'X-Mailer: PHP/'.phpversion();
$mresult = mail($to, $subject, $message, $headers);
I have checked $contact
and It is written as olcayertas@gmail.com
in my config.php
file. Before sending mail I have use echo function to debug my code and it is correct.
Currently my $contact variable is set to:
$contact = "olcayertas@gmail.com";
UPDATE 1
Setting sendmail_from
to olcayertas@gmail.com
in php.ini
as @Jared Farrish suggested solved the first problem. But now I have a new problem:
"DEBUG" 3108 "2012-01-08 22:15:28.497" "Creating session 24"
"SMTPD" 3108 24 "2012-01-08 22:15:28.498" "127.0.0.1" "SENT: 220 localhost ESMTP"
"SMTPD" 3108 24 "2012-01-08 22:15:28.499" "127.0.0.1" "RECEIVED: HELO olcay-pc"
"SMTPD" 3108 24 "2012-01-08 22:15:28.500" "127.0.0.1" "SENT: 250 Hello."
"SMTPD" 4380 24 "2012-01-08 22:15:28.511" "127.0.0.1" "RECEIVED: MAIL FROM:<olcayertas@gmail.com>"
"DEBUG" 4380 "2012-01-08 22:15:28.542" "Total spam score: 0"
"SMTPD" 4380 24 "2012-01-08 22:15:28.547" "127.0.0.1" "SENT: 250 OK"
"SMTPD" 3108 24 "2012-01-08 22:15:28.548" "127.0.0.1" "RECEIVED: RCPT TO:<olcayertas>"
"SMTPD" 3108 24 "2012-01-08 22:15:28.548" "127.0.0.1" "SENT: 550 A valid address is required."
"SMTPD" 2040 24 "2012-01-08 22:15:28.552" "127.0.0.1" "RECEIVED: QUIT"
"DEBUG" 2040 "2012-01-08 22:15:28.552" "Deleting message file"
"SMTPD" 2040 24 "2012-01-08 22:15:28.552" "127.0.0.1" "SENT: 221 goodbye"
"DEBUG" 4380 "2012-01-08 22:15:28.555" "Closing TCP/IP socket"
"DEBUG" 4380 "2012-01-08 22:15:28.556" "Ending session 24"
It seems like it does not get destination address completely. I am trying to send mail to myself but it gets only username olcayertas
and missing domain @gmail.com
.
UPDATE 2
I have solved the second problem. It was my mistake.
UPDATE 3
Now I am getting this error:
"SENT: 530 SMTP authentication is required."
But I have already filled SMTP authentication settings under Settings->Ptotocols->SMTP->Delivery of e-mail->SMTP Relayer
. Server requires authentication
and Use SSL
otions checked.
UPDATE 4
Disabling Require SMPTP authentication
options of hMailServer in Settings->Advanced->IP Ranges->My Compter
solved SMTP authentication problem.
解决方案 To solve SENT: 550550 The address is not valid.
problem, you have to set sendmail_from
to a valid mail address in php.ini
file.
To solve SENT: 530 SMTP authentication is required
problem, open hMailServer Administrator. Go to Settings->Advanced->IP Ranges->My Compter. Disable all options under "Require SMTP authentication" section.
这篇关于将邮件发送到本地邮件服务器 - “SENT:550该地址无效”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!