- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
$to = "jijodasgupta@gmail.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
echo("pMessage successfully sent!/p");
} else {
echo("pMessage delivery failed.../p");
}
写了一个基本的 php sendmail 代码,但它给了我以下错误:
Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\xampp\htdocs\mail.php on line 5 Message delivery failed...
我更改了 ``php.ini 文件并放入 sendmail_from=jijodasgupta@gmail.com
但问题仍然存在。第一次写邮件脚本。
我做错了什么吗?有更好的方法吗?
最佳答案
additional_headers (optional)
String to be inserted at the end of the email header.
This is typically used to add extra headers (From, Cc, and Bcc). Multiple extra headers should be separated with a CRLF (\r\n).
Note: When sending mail, the mail must contain a From header. This can be set with the additional_headers parameter, or a default can be set in php.ini. Failing to do this will result in an error message similar to Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing. The From header sets also Return-Path under Windows.
希望对您有所帮助。
关于sendmail - php发送邮件代码不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1104555/
我知道我可以使用 -f 开关来设置 sendmail 的返回路径,我想知道是否可以在某处更改默认返回路径,或者唯一的方法是在每次发送时设置它。 最佳答案 您可以使用FEATURE(genericsta
mailx和sendmail有什么区别? 哪一个发送电子邮件的效率最高(从性能角度来看)? 最佳答案 mailx 是邮件客户端。它可以撰写电子邮件并将其发送到本地邮件传输代理(sendmail、p
在通过 sendmail 和 procmail 处理入站电子邮件时,我无法将 procmail 日志条目与 sendmail 的邮件日志条目进行匹配。 Sendmail 将 queue-id 发布到日
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a softwa
我对我们的 Web 服务器中的问题感到有点绝望。我们的网络是一个拥有大量用户和事件的社区。我们向用户发送他们感兴趣的事件的个性化邮件。我们在处理这些邮件的脚本中遇到问题。 我们的批量电子邮件脚本在有数
我正在使用 Google Apps for Domain 来托管来 self 的域的电子邮件,并且我已根据 Google 文档在我的网站上设置了 MX 记录。我还可以使用“sendmail”服务器从我
我正在尝试在我的 FreeBSD 服务器上使用双 MTA SA/VS 实现设置新安装的 Sendmail。当我自己处理邮件时,一切似乎都运行良好,但是当我尝试通过我的智能主机发送邮件时(我在其他服务器
我已经在 phpinfo 文件中的实时服务器(Linux basd LAMP)上上传了我的 joomla 项目,我发现了 "/usr/sbin/sendmail -t -i"用于 smtp 配置。和我
我正在处理一个反垃圾邮件项目( centmail ),该项目涉及让发件人使用添加自定义 header (以及签名,但该部分是 easier )的客户端插件。一般的问题是向您的外发邮件添加电子邮件 he
$to = "jijodasgupta@gmail.com"; $subject = "Hi!"; $body = "Hi,\n\nHow are you?"; if (mail($to, $subj
我刚刚尝试使用 sendmail 功能如 Mail::Sendmail 中所述 我发现只要我有一个 SMTP 服务器在本地主机上运行,我就可以从任何域发送带有用户 ID 的邮件。这怎么行?或者我错
我正在尝试使用以下命令从命令行发送邮件: echo "Subject: sendmail test" | sendmail xyz@mail.com 这可以正常工作并显示主题,但是我无法为此添加正文。
我已经在 Centos 7 上安装了 sendmail 并使用 SMART_HOST 设置了中继服务器。 但是 sendmail 在发送电子邮件时没有使用我的中继服务器,它一直使用 localhost
我有一台虚拟 CentOS 机器,我需要配置 sendmail 进行集成测试。我需要 sendmail 接受来自任何地方的所有电子邮件,而不是进行任何用户验证。我只需要它接受所有传入的有效电子邮件,而
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 4年前关闭。 Improve thi
尝试在脚本中发送电子邮件时,我当前使用的主机具有粗略的可靠性。 (我认为他们对让任何垃圾邮件通过真的很苛刻,而且他们碰巧也过滤掉了一些合法的东西)。我基本上需要一个替代方案。我记得看到一个网站,你可以
我已被添加到 CBL 列表中,因为我们的 Fedora 17 服务器(我们已对其进行了更新)现在正在发送将自身标识为 localhost.localdomain 的邮件。 我已从一台装有 fedora
我正在尝试在 GitLab 中设置电子邮件发件人。 我已经按照指南中的建议安装了 postfix,但是当我注册新用户时,没有发送电子邮件。 我已经尝试使用我的一个 Windows 邮件服务器的配置来配
我有一个 jar 的 UI 包装器。当 UI 触发事件“submitButton”时,将调用以下方法来执行它。 jar 在单独的进程中执行,但仅在调用进程(即 UI 服务器)停止后才会发送邮件。知道为
我尝试在我的应用程序 java 中创建一个 EmailSender 我制作了电子邮件框架,然后用谷歌搜索一些可以帮助我的例子, 所以我发现这个教程非常有用 http://www.javapractic
我是一名优秀的程序员,十分优秀!