PHP Joomla DB and mailer