无法在joomla中启动邮件功能 [英] cannot initiate mail function in joomla

查看:311
本文介绍了无法在joomla中启动邮件功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在发送邮件时在Joomla中收到此错误.

I am getting this error in Joomla while sending the mail.

我并非每次都会收到此错误.但是有时候它显示出我无法启动邮件功能".

I am not getting this error every time. But some times its shows me "cannot initiate mail function".

有什么解决办法吗?

推荐答案

这可以是任意数量的东西,但是首先要检查的一般列表是您的Joomla配置:

That could be any number of things, but a general list of things to check would be first, your Joomla config:

管理面板>全局配置>服务器>邮件设置>邮件程序

Admin panel > Global Configuration > Server > Mail Settings > Mailer

确保将其设置为使用PHP邮件功能.如果是这样,请尝试创建一个名为test.php的脚本,并将其放在您网站的根目录中(Joomla的index.php文件所在的位置).使该文件是这样的:

Make sure that's set to use the PHP mail function. If it is, try making a script called test.php and putting it in the root of your site (where the index.php file is for Joomla). Make that file something like this:

<?php

$to = "you@youremailaddress.com";
if( mail( $to , 'This is a test message.' , 'Is this working?' ) ) {
    echo 'Email sent.';
} else {
    echo 'Email failed to send.';
}

?>

确保将$ to =行更改为您的电子邮件地址. 现在转到该脚本: http://www.yourjoomlasite.com/test.php 您应该看到电子邮件已发送"文本.在您的浏览器中,然后收到一封电子邮件,其中包含您输入的地址.如果不是,那么您应该联系您的托管服务提供商,并要求他们升级到最新的PHP版本和/或为您解决mail()函数问题.这是通过PHP发送邮件的最原始的实现,如果无法正常工作,则与主机有关.

Make sure you change the $to = line to your email address. Now go to that script: http://www.yourjoomlasite.com/test.php You should see the text 'Email sent.' in your browser and then receive an email to that address you entered. If not, then you should contact your hosting provider and ask them to upgrade to the latest PHP version and/or resolve the mail() function issue for you. That is the most raw implementation of sending mail via PHP and if that fails to work then it's got to be an issue with your host.

这篇关于无法在joomla中启动邮件功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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