无法连接SMTP [英] failED to connect SMTP

查看:145
本文介绍了无法连接SMTP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

警告:mail()[function.mail]:无法通过"localhost"端口25连接到邮件服务器,无法验证php.ini中的"SMTP"和"smtp_port"设置,或在C:\ wamp中使用ini_set()第101行的\ www \ Login \ insert.php

我正在使用以下代码!



Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\Login\insert.php on line 101

I am using the following code!!



$sendto = $_POST['email']; // this is the email address collected form the form
$ccto = "you@yourdomain.com"; //you can cc it to yourself
$subject = "email confirmation"; // Subject
$message = "the body of the email - this email is to confirm etc..."
$header = "From: auto-confirm@yourdomain.com\r\n";
$header .= "Reply-to: you@yourdomain.com\r\n";
// This is the function to send the email
mail($sendto, $subject, $message, $header);      // line no... 101




请帮忙!!




Please Help!!

推荐答案

sendto =
sendto =


_POST [ ' 电子邮件']; // 这是从表单收集的电子邮件地址
_POST['email']; // this is the email address collected form the form


ccto = " ; // 您可以将其抄送给自己
ccto = "you@yourdomain.com"; //you can cc it to yourself


这篇关于无法连接SMTP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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