Php 无法连接到本地主机上的mailserver
我想向输入的电子邮件地址发送电子邮件。但我一直在犯这个错误Php 无法连接到本地主机上的mailserver,php,email,Php,Email,我想向输入的电子邮件地址发送电子邮件。但我一直在犯这个错误 mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() 这是我的密码 <?php $email=$_POST["email"]; $message="Your application h
mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()
这是我的密码
<?php
$email=$_POST["email"];
$message="Your application has been submitted tothe Incharge and Admin of the classes. Thanks for applying at our insitute.";
mail($email,"Confirm Application", $message, "From: anemade45@gmail.com");
?>
<form method="post">
<input type="email" name="email" placeholder="enter your email address">
</form>
我应该怎么做才能删除该错误?您不能从本地主机发送电子邮件,除非您设置了一些邮件代理,我相信,您可以从电子邮件提供商处获得SMTP设置,例如:
您必须注册一个域,即使localhost也可以使用其中任何一个域,并且必须获得SMTP设置我希望链接可以帮助您您是否在localhost上安装了邮件服务器?可能存在重复的