Fatal error's: Class 'JMailHelper' not found/Undefined class

Need help with the Administration of your Joomla! 1.5 site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
bfaridnia
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Wed Jul 08, 2009 4:50 am

Fatal error's: Class 'JMailHelper' not found/Undefined class

Post by bfaridnia » Mon Oct 05, 2009 6:17 pm

Hi receive the following two errors:

"Fatal error: Class 'JMailHelper' not found in (MYSITE)/public/components/com_contact/controller.php on line 118"

This occurs when trying to submit an email contact form on the front end.
Lines 113-123 look like:

Code: Select all

/*
		 * If there is no valid email address or message body then we throw an
		 * error and return false.
		 */
		jimport('joomla.mail.helper');
		if (!$email || !$body || (JMailHelper::isEmailAddress($email) == false))
		{
			$this->setError(JText::_('CONTACT_FORM_NC'));
			$this->display();
			return false;
		}
and

"Fatal error: Undefined class name 'jmailhelper' (MYSITE)/public/libraries/joomla/database/table/user.php on line 157"

This occurs when trying to modify user settings in the back end. (editor or any other settings)
Line 157-159 looks like:

Code: Select all

if ((trim($this->email) == "") || ! JMailHelper::isEmailAddress($this->email) ) {
			$this->setError( JText::_( 'WARNREG_MAIL' ) );
			return false;
		}
I verified permissions on both files and they are set to full Read Write Execute. Did not notice these issues until I added the Contact Us page on the front end.

Any ideas?

Just checked my PHP version and I guess the Hosting Co. Changed it to PHP5. I Changed to PHP4 temporarily to see if this resolved the issue and it did not.

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17510
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Fatal error's: Class 'JMailHelper' not found/Undefined class

Post by toivo » Tue Oct 06, 2009 9:47 am

The class JMailHelper is defined on line 29 of libraries/joomla/mail/helper.php. That file is either missing or corrupted. Try copying it from the installation package to the server. If other similar errors occur, it is best to copy all the files.
Toivo Talikka, Global Moderator

bfaridnia
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Wed Jul 08, 2009 4:50 am

Re: Fatal error's: Class 'JMailHelper' not found/Undefined class

Post by bfaridnia » Tue Oct 06, 2009 6:43 pm

Will do. When you mention copying all the files, do you mean all files in the Mail Directory. I am planning on upgrading to 1.5.14 will this upgrade copy those files over or just updated files. If not, I can download an installation package and copy the files.

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17510
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Fatal error's: Class 'JMailHelper' not found/Undefined class

Post by toivo » Wed Oct 07, 2009 1:56 am

The upgrade package does not necessarily have that particular file. It is best to extract the replacement for the corrupt file from the original installation zip archive for your version, test the site carefully and if everything works all right, then upgrade.
Toivo Talikka, Global Moderator

townofmeredith
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Feb 19, 2014 7:08 pm

Re: Fatal error's: Class 'JMailHelper' not found/Undefined c

Post by townofmeredith » Wed Apr 01, 2015 8:03 pm

What if you don't have the original installation zip? And is toivo talking all the files in the mail directory?

manusstar
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Jan 12, 2016 1:39 pm

Re: Fatal error's: Class 'JMailHelper' not found/Undefined c

Post by manusstar » Fri Apr 22, 2016 7:01 pm

toivo wrote:The class JMailHelper is defined on line 29 of libraries/joomla/mail/helper.php. That file is either missing or corrupted. Try copying it from the installation package to the server. If other similar errors occur, it is best to copy all the files.
Thank You Toivo....I found the entire folder empty...and solved my issue by pasting entire contents...Thanks a ton!


Locked

Return to “Administration 1.5”