简单的PHP邮件功能不工作在Amazon EC2服务器 [英] Simple PHP Mail function not working on Amazon server EC2

查看:180
本文介绍了简单的PHP邮件功能不工作在Amazon EC2服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请参阅此code

<?php
$to = "someone@example.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "someonelse@example.com";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?> 

什么是这个code中的问题。它不工作亚马逊Linux服务器

what is the problem in this code . Its not working on Amazon Linux server

感谢

推荐答案

你是否愿意使用其他邮件框架?如果是的话,你可以用PHPMailer的...它为我工作正常。

are you willing to use other mailing framework? If yes, you can use phpmailer...it works fine for me.

这里是他们的网站的链接。 http://phpmailer.worxware.com/

here is the link on their site. http://phpmailer.worxware.com/

这篇关于简单的PHP邮件功能不工作在Amazon EC2服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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