PHP邮件未发送到电子邮件 [英] PHP Mail Not Sending To Email

查看:98
本文介绍了PHP邮件未发送到电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的php代码,用于发送电子邮件,但没有向我的电子邮件发送任何内容

This is my php code to send an email however it is not sending anything to my email

PHP

<?php
    mail("nishil.shah17@gmail.com","PHP Mail Works!","Awesome","Hello");
?>

推荐答案

语法错误您忘记了输入 @ 正确的语法是

The syntax is wrong You forgot to put @ correct syntax is

<?php 
   @mail("nishil.shah17@gmail.com","PHP Mail Works!","Awesome","Hello");
?>

还有另外一件事,如果您在 localhost 上使用它可能无法正常工作,因此必须在远程服务器

and one more thing if you are using it on localhost than possible it won't work so you have to check it on remote server

这篇关于PHP邮件未发送到电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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