cannot initiate mail function in joomla

主宰稳场 提交于 2019-12-06 16:37:59

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

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.';
}

?>

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.

If you are working in the local server, the mail will not initiate. So host your website in server and try it.

If you have any questions, let me know

If you are using WAMP or similar on your own machine and are getting this message then you need to install a mail server. This is the best solution on Windows.

http://www.toolheap.com/test-mail-server-tool/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!