1

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".

Any solution for this?

3
  • Is it on your server or hosting? Have you contacted your hosting administration team? Where are you sending the messages from (in joomla)?
    – WooDzu
    Aug 10, 2011 at 15:32
  • How are you using mailing? is it using mail() directly or maybe using JUtility::sendMail()? If using Joomla built-in functions, it depends on the parameters set at configuration.php, specifically the $mailer variable.
    – Orlando
    Aug 10, 2011 at 16:59
  • this goes without saying but have you need able to use sendmail to send email on your linux box? By default Joomla mail will only work in a linux environment.
    – Ali
    Aug 11, 2011 at 5:47

3 Answers 3

2

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 = "[email protected]";
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.

0

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

0

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/

1
  • Hi soren, you have given the tool which I was searching since very long. thanks for this....
    – Avinash
    Aug 12, 2011 at 18:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.