I am getting the following error message on my Joomla site:

Fatal error: require(): Cannot redeclare class mailtohelper in /home/web/public_html/joomla/components/com_content/helpers/icon.php on line 84

Any help is appreciated

  • What version of Joomla? Have you made any changes to this file?
    – Lodder
    Commented Jan 22, 2016 at 10:17
  • the version im using is joomla 3.4.8, and I immigrated to another server !
    – zenami
    Commented Jan 22, 2016 at 10:22
  • What version of PHP are you running on your new server?
    – Lodder
    Commented Jan 22, 2016 at 10:24
  • i'm running PHP Version 5.4.45
    – zenami
    Commented Jan 22, 2016 at 10:47
  • 1
    An extension is trying to redeclare a class mailtohelper. This error often occurs to me when I create new extension and forget to rename the class on the helper.php file. Try to disable latest extensions you recently installed and then enable one by one to find which one is causing the problem
    – Marco
    Commented Jan 22, 2016 at 17:03

2 Answers 2


A 3rd party extension is causing this. The mailtohelper shouldn't be invoked directly. Just use the Joomla mail object:

$mailer = JFactory::getMailer();

Joomla Doc - Sending email from extensions

  • 1
    Pretty sure he's hasn't even suggested he can code.
    – BodgeIT
    Commented Nov 22, 2016 at 17:52

instead of

require ('file_path_here');

try using


Whenever you need any file to be included in the current page then remember,

require() includes file that previously been included. require_once() ignore the file if it is previously been included in the same page.

try to figure out difference between include(), include_once(), require(), require_once() then use whichever is best for you.

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.