简体   繁体   English

PHP无法发送邮件

[英]php unable to send mail

I'm trying to set up a php script to send an email on a server with a joomla installed, I got the some script working in other project and is working fine. 我正在尝试设置一个php脚本,以在安装了joomla的服务器上发送电子邮件,我在其他项目中使用了某些脚本,并且工作正常。 I'm using this script on a landing page separate from Joomla. 我正在与Joomla分开的目标网页上使用此脚本。 I had check the phpinfo and this is what it's show. 我检查了phpinfo,这就是显示的内容。

mail.add_x_header   On  On
mail.force_extra_parameters no value    no value
mail.log    no value    no value
sendmail_from   no value    no value
sendmail_path   no value    no value

I'm wondering if the joomla is interfering with the mail function of php or if the function is not properly set up in php.ini 我想知道joomla是否会干扰php的邮件功能,或者该功能是否在php.ini中未正确设置

Thank you! 谢谢!

I am sure there are lot of plugins you can install. 我确信您可以安装很多插件。

Or, 要么,

Try PHPMailer. 尝试使用PHPMailer。 I have used it in the past. 我过去曾经用过。 It's very easy to implement. 这很容易实现。

https://github.com/PHPMailer/PHPMailer https://github.com/PHPMailer/PHPMailer

Hope this helps. 希望这可以帮助。

It means you haven't correctly setup your mail server in Joomla! 这意味着您没有在Joomla中正确设置邮件服务器!

To setup the mail server go to Global Configurations > Server > Mail settings 要设置邮件服务器,请转至全局配置>服务器>邮件设置

Choose the best option for your mail settings from the dropdown and setup! 从下拉菜单和设置中为您的邮件设置选择最佳选项!

If you have a cPanel, go to Mail section and find info about your email, authentication type and more! 如果您有cPanel,请转到“邮件”部分,找到有关您的电子邮件,身份验证类型等的信息!

Hope this helps! 希望这可以帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM