Jeepstone

The home of Pete Jones

E-mail could not be sent in Joomla ‘Send to a friend’ popup

I recently had a ‘bug’ in Joomla where I’d get “E-mail could not be sent” when sending an article to a friend. The funny thing was, it had worked and I had mail in my inbox to prove it. I tried all the different mail settings and still had nothing. This was when I stumbled on the fact that to prevent spamming of the form, the page needs to wait for 20 seconds before being sent.

If you want to change this, open up Components > com_mailto > controller.php and right at the top you’ll have:


define('MAILTO_TIMEOUT', 20);

You can change this (but leave your form open to spamming), or alternatively add in a better message to tell the user what is going on:


JError::raiseNotice( 500, JText:: _ ('EMAIL_NOT_SENT' ));

change to


JError::raiseNotice( 500, JText:: _ ('EMAIL_NOT_SENT_SPAMWAIT' ));

and then in your Languages > en_GB > enGB.com_mailto.ini, add in


EMAIL_NOT_SENT_SPAMWAIT=To prevent this form being spammed you need to wait 20 seconds before you submit the form.

Tags: ,

This entry was posted on Friday, January 29th, 2010 at 2:13 pm and is filed under Joomla. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Jeepstone is proudly powered by WordPress 2.9.1 | Entries (RSS) | Comments (RSS).