jim007 Posted February 2, 2017 Share Posted February 2, 2017 When I select contact everything works like it is supposed to, fields, captcha, and successfully sent... but no mail shows up. Is there something in the code that I have wrong? Please liberate my brain! I fried it trying to figure this out. I know it is something simple that I am over looking also. thank you in advance! and I do apologize for my lack of knowledge of this but I am trying (old dog - not good with new tricks) <?php /** * ------------------------------------------------------------------------ * for Joomla 3.x * ------------------------------------------------------------------------ * * @----------------------------------------------------------------------@ */ // No direct access to this file defined('_JEXEC') or die('Restricted access'); jimport('joomla.application.component.controllerform'); class JUDirectoryControllerContact extends JControllerForm { protected $text_prefix = 'COM_JUDIRECTORY_CONTACT'; public function send() { JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); $app = JFactory::getApplication(); $data = $app->input->post->get('jform', array(), 'array'); $listingId = $data['listing_id']; $sendCopy = isset($data['sendcopy']) ? true : false; if ($listingId) { $showCaptcha = JUDirectoryFrontHelperPermission::showCaptchaWhenContactListing($listingId); if ($showCaptcha) { $permission = JUDirectoryFrontHelperCaptcha::checkCaptcha(); if (!$permission) { $this->setRedirect(JRoute::_(JUDirectoryHelperRoute::getContactRoute($listingId), false)); $this->setMessage(JText::_('COM_JUDIRECTORY_INVALID_CAPTCHA'), 'error'); return false; } } if (!JUDirectoryFrontHelperMail::sendEmailByEvent('listing.contact', $listingId, $data)) { $this->setRedirect(JRoute::_(JUDirectoryHelperRoute::getContactRoute($listingId), false)); $this->setMessage(JText::_('COM_JUDIRECTORY_FAIL_TO_SEND_CONTACT_EMAIL'), 'error'); return false; } if ($sendCopy) { if (JUDirectoryFrontHelperMail::sendEmailByEvent('listing.contactcopy', $listingId, $data)) { $this->setMessage(JText::_('COM_JUDIRECTORY_SEND_CONTACT_COPY_EMAIL_SUCCESSFULLY')); } else { $this->setMessage(JText::_('COM_JUDIRECTORY_FAIL_TO_SEND_CONTACT_COPY_EMAIL'), 'error'); } } $this->setRedirect(JRoute::_(JUDirectoryHelperRoute::getContactRoute($listingId), false)); $this->setMessage(JText::_('COM_JUDIRECTORY_SEND_CONTACT_EMAIL_SUCCESSFULLY')); return true; } $this->setRedirect(JRoute::_(JUDirectoryHelperRoute::getContactRoute($listingId), false)); $this->setMessage(JText::_('COM_JUDIRECTORY_FAIL_TO_SEND_CONTACT_EMAIL'), 'error'); return false; } public function cancel($key = null) { JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); $app = JFactory::getApplication(); $listingId = $app->input->getInt('listing_id', 0); $listingObject = JUDirectoryHelper::getListingById($listingId); $this->setRedirect(JRoute::_(JUDirectoryHelperRoute::getListingRoute($listingId, '', $listingObject->language), false)); } } Quote Link to comment https://forums.phpfreaks.com/topic/303080-confused-by-no-mail-showing-up/ Share on other sites More sharing options...
jim007 Posted February 4, 2017 Author Share Posted February 4, 2017 or am I looking in the wrong section? Quote Link to comment https://forums.phpfreaks.com/topic/303080-confused-by-no-mail-showing-up/#findComment-1542301 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.