PDA

View Full Version : contact form not working


stephen McBride
11-15-2006, 07:36 PM
I currently use your script. however I notice if you try to make contact using the contact form, the message does not reach me. However my email address is configured correctly.

Any ideas what maybe wrong

Thanks
Stephen

Dave Baker
11-15-2006, 09:35 PM
Hello Stephen,
All "contact" messages should be available in Admin Panel » Manage Contacts
Please check it.

stephen McBride
11-15-2006, 10:48 PM
Dave, thanks for reply. hmm ok, so the contact messages don't come directly to the email address we have specified on the site? We have to log in to the admin to check for messages?

Dave Baker
11-19-2006, 11:00 PM
Stephen if you want this function, you can simply implement it:
Admin Panel » Manage Admins » Edit Admin Submission Notification » Enabled
***Open classes/Dir.php and find function addContact

function addContact($aFullname, $aEmail, $aBody)

***In this function before this line of code ***

return $this->mDb->query($sql);

***add**

$admin =& $this->getAdmin();
if ($admin['submit_notif'])
{
$this->mMailer->sendContactNotif($admin, $aFullname, $aEmail, $aBody);
}

***Save file***
***Open classes/DirMailer.php and find function***

function sendEmail($aEmail, $aSubject, $aBody, $aFrom, $aReplyto) {
return mail($aEmail, $aSubject, $aBody, "From: {$aFrom}\r\n"."Reply-To: {$aReplyto}\r\n");
}

***Below this function add***

function sendContactNotif($aAdmin, $aFullname, $email, $body)
{
$this->sendEmail($aAdmin['email'], $aFullname, $body, $this->mConfig['site_email'], $email);
}

***Save file***

After that you will receive messages by Email also messages will be available in Admin Panel » Manage Contacts.