voodish logo
tweet rss book of faces Linked In

Joomla E-mail could not be sent [FIXED]

joomla_logo.jpg

A lot of people are experiencing problems with Joomla not sending mail out, notably from the Email Pop window, the system simply returns “E-mail could not be sent”.
In this article we show how to fix the problem quickly and easily.

Problem

Joomla not sending out email via pop up window

Solution

To resolve this problem, open this file:

components/com_mailto/controller.php

Locate the following line of code (approximately line 57):

if($timeout == 0 || time() - $timeout < 20) {

Change the line to the following:

if($timeout == 0 || time() - $timeout > 20) {

Save, Upload and test.
You can also increase the time from 20 to say 50.

You can read more about this bug here

Told you it was an easy fix :D

Related Articles

Comments RSS Feed

32 Comments

  1. KIshan June 3, 2009

    Thanks a lot dude…

  2. Go to Top of the page

  3. Edwin July 6, 2009

    Thanks! Small fix for a big problem!

  4. Go to Top of the page

  5. Allegro July 29, 2009

    This was originally posted here: http://forum.joomla.org/viewtopic.php?f=471&t=376453&start=0

    There are additional fixes posted for users that are experiencing similar email issues.

  6. Go to Top of the page

  7. admin July 29, 2009

    Yes, and here it is in a simple, easy to understand format.

    The correct link is supplied in the post above as the Bug report, where the original fix was derived for your link!

  8. Go to Top of the page

  9. Patsy Caldwell August 20, 2009

    You are a lifesaver! This fixed the problem for me - no problem!

  10. Go to Top of the page

  11. jeanette November 23, 2009

    Thanks a lot!!! Fixed the problem immediately:-)

  12. Go to Top of the page

  13. Mario Juárez May 4, 2010

    Muchas gracias!

  14. Go to Top of the page

  15. Wine and Food Tips September 17, 2010

    Thanks a zillion, this information is useful.

  16. Go to Top of the page

  17. Kobe September 21, 2010

    Thank you!!
    That headache is gone!

  18. Go to Top of the page

  19. Robert October 1, 2010

    This is not a very good solution.

    the sentence :

    if($timeout == 0 || time() - $timeout
    ‘ );
    return false;
    }

    form.submit();
    }
    –>

  20. Go to Top of the page

  21. Robert October 1, 2010

    Sorry above too lengthy message. Fix the problem in mail_to/tmpl/default.php by creating a delay before form.submit().

  22. Go to Top of the page

  23. Shekhar Sagar Srivastava March 4, 2011

    Wohah!!!, Its Works, Thanks Man, Great Job

  24. Go to Top of the page

  25. Ben Jadue June 11, 2011

    After making the changes I still get the

    – Email could not be sent. –

    Using Joomla 1.6.3

  26. Go to Top of the page

  27. Celtica July 6, 2011

    Dude… Thanks so much.
    I have tweaked the mail settings for 3 hours now… nothing works.

    You are the first in like 100 search results that gives me this tip.

    I looked at you sollution for like 20 times to even notice the difference..

    Thanks!!!! This works like a charm.

  28. Go to Top of the page

  29. rajesh September 12, 2011

    Will this work in joomla 1.6 ??? looks the files are for 1.5
    :(

    please revert.

  30. Go to Top of the page

  31. George November 13, 2011

    Thank you very much for this fix out. It works for my joomla website , I use PHP Mail Function in settings…

  32. Go to Top of the page

  33. pradeep December 2, 2011

    thanks dude
    small code for big proble

  34. Go to Top of the page

  35. Amy January 12, 2012

    THANK YOU! Such a small thing was driving me NUTS!

  36. Go to Top of the page

  37. Blue February 15, 2012

    Thanks! Saved me a lot of time!

  38. Go to Top of the page

  39. Christian Louboutin March 23, 2012

    thank you for info

  40. Go to Top of the page

  41. Drew March 23, 2012

    Worked like a champ! Nice work.

  42. Go to Top of the page

  43. Arevindh March 29, 2012

    Thankx .. it solved my problem …

  44. Go to Top of the page

  45. Kathy Lin April 7, 2012

    very good points and will share this, thanks.:)

  46. Go to Top of the page

  47. Sascha April 11, 2012

    Works great on Joomla 2.5. Had a lot of problems with email function, sometimes it worked, sometime not.
    After this change, no fail anymore.
    Thousand thanks

  48. Go to Top of the page

  49. hermes birkin April 17, 2012

    Works great on Joomla 2.5. Had a lot of problems with email function, sometimes it worked, sometime not.

  50. Go to Top of the page

  51. Mihc August 16, 2012

    It works great on J!2.5.6

  52. Go to Top of the page

  53. Vicky August 24, 2012

    I tried above solution but still getting same error with joomla 2.5. I verified my mail settings which looks correct.

  54. Go to Top of the page

  55. Anni September 8, 2012

    I tried the above solution also but still am not receiving the emails sent via contact forms that come with Joomla 2.5. Are there possibly other things we need to do to fix this issue? I’ve read many discussions on this but still haven’t found a fix.

  56. Go to Top of the page

  57. Charles September 8, 2012

    I tried this and it worked - mail was sent satisfactorily. However after the mail was sent the pop-up window tried to reload the index page of the site, which was the sample data in v2.5. I assume the pop-up should just close. Any thoughts on this problem?

  58. Go to Top of the page

  59. BilliyJoe November 26, 2012

    Thank you so much, I’ve been searching for hours…

  60. Go to Top of the page

  61. dryden May 7, 2013

    Thx dude!

  62. Go to Top of the page

  63. Pluto August 22, 2013

    “E-mail was sent successfully” but didn’t receive the e-mail.

    I’m using Joomla 3.0

    Mailer Settings :
    Mailer : PHP Mail
    From email : my personal E-mail address
    From Name : personal name
    Sendmail : Path /usr/sbin/sendmail
    SMTP Authentication : No
    SMTP Security : None
    SMTP port : 25
    SMTP username : blank
    SMTP password : blank
    STMP Host : localhost

  64. Go to Top of the page

Leave a comment