无法连接到邮件服务器在“本地主机”端口25,验证您的“SMTP” [英] Failed to connect to mailserver at "localhost" port 25, verify your "SMTP"

查看:4368
本文介绍了无法连接到邮件服务器在“本地主机”端口25,验证您的“SMTP”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试过互联网上的每一种方式,但是没有人解决我的问题。我正在使用WAMP 2.2

I have tried every single way on the internet but non of those solve my problem. I'm using WAMP 2.2

我正在使用表单要求Nyu学生的电子邮件,当学生将表单发送到另一个nyu.edu电子邮件并收到确认。

I'm using a form to require nyu student email and when the student submit the form it will send to another nyu.edu email and receive a confirmation.

原始代码

// send the notification email
$mailto =  $EMAIL;//requied from the form
$subject = "Thank you for your nomination!";
$body = 
"Dear ".$NAME.",

This confirms that we have received your nomination of ".$NOMINEE." for a teaching award. Thank you for your submission.

NYU Teaching Awards Team";
$headers = "From: somemail@example.com\n\n";
if (mail($mailto, $subject, $body, $headers)) {
    echo("<p>Message successfully sent!</p>");
} else {
    echo("<p>Message delivery failed...</p>");
}
//end notification email


// send the notification email
$mail_to =  "somemail@example.com";
$email_subject = "New Teaching Award Nomination";
$email_body = 
"A new teaching award nomination has been submitted by ".$NAME." nominating ".$NOMINEE.".";
$email_headers = "From: somemail@example.com\n\n";
if (mail($mail_to, $email_subject, $email_body, $email_headers)) {
    echo("<p>Message successfully sent!</p>");
} else {
    echo("<p>Message delivery failed...</p>");
}
//end notification email

错误msg是无法连接到localhost端口25上的邮件服务器,验证您的SMTP

所以然后我绑定

ini_set("SMTP","nyu.smtp.edu");
ini_set("smtp_port","587");

但显示:无法在nyu.smtp.edu端口连接到mailserver 587,验证您的SMTP

我不知道该怎么办!请帮助

I don't know what to do!! please help

推荐答案

nyu.smtp.edu看起来不正确。尝试smtp.nyu.edu。你可能会回到使用25号港口。

"nyu.smtp.edu" doesn't look right. Try "smtp.nyu.edu". You might go back to using port 25.

这篇关于无法连接到邮件服务器在“本地主机”端口25,验证您的“SMTP”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆