getstock Posted January 20, 2009 Share Posted January 20, 2009 When a customer trys to send an email in the contact page, they just get a message stating:There is 1 error : 1. an error occurred while sending messageThis happens if I use phpmail or smtp server settings.My domain is hosted on my own machine using wamp, and I am using google tools for domains for email. I have installed the correct modules in prestashop admin (Version 1.1.0.5) and can not seem to get rid of this error!I have searched around the forum but can not really find anything in english that helps Many ThanksDave Link to comment Share on other sites More sharing options...
Guest Posted January 20, 2009 Share Posted January 20, 2009 So you run it from your local machine? If so, check your firewall and port 25... Link to comment Share on other sites More sharing options...
getstock Posted January 20, 2009 Author Share Posted January 20, 2009 Yes, it can be found at www.getstock.co.uk if you want to take a look if that helps.I have other sites running from the same machine and the php mail function works fine on them, just cant work it out! Link to comment Share on other sites More sharing options...
Guest Posted January 20, 2009 Share Posted January 20, 2009 Well, got the error, kindly check the contact-form.php code... Link to comment Share on other sites More sharing options...
getstock Posted January 20, 2009 Author Share Posted January 20, 2009 Thanks for your help so far I cant see anything wrong with it <?php$useSSL = true;include(dirname(__FILE__).'/config/config.inc.php');include(dirname(__FILE__).'/header.php');$errors = array();$smarty->assign('contacts', Contact::getContacts(intval($cookie->id_lang)));if (Tools::isSubmit('submitMessage')){ if (!($from = Tools::getValue('from')) OR !Validate::isEmail($from)) $errors[] = Tools::displayError('invalid e-mail address'); elseif (!($message = nl2br2(Tools::getValue('message')))) $errors[] = Tools::displayError('message cannot be blank'); elseif (!Validate::isMessage($message)) $errors[] = Tools::displayError('invalid message'); elseif (!($id_contact = intval(Tools::getValue('id_contact'))) OR !(Validate::isLoadedObject($contact = new Contact(intval($id_contact), intval($cookie->id_lang))))) $errors[] = Tools::displayError('please select a contact in the list'); else { if (Mail::Send(intval($cookie->id_lang), 'contact', 'Message from contact form', array('{email}' => $_POST['from'], '{message}' => stripslashes($message)), $contact->email)) $smarty->assign('confirmation', 1); else $errors[] = Tools::displayError('an error occurred while sending message'); }}$smarty->assign('errors', $errors);$smarty->display(_PS_THEME_DIR_.'contact-form.tpl');include(dirname(__FILE__).'/footer.php');?> Link to comment Share on other sites More sharing options...
getstock Posted January 20, 2009 Author Share Posted January 20, 2009 Solved I installed sendmail on my server and then changed it back to php mail, if you have this problem then check out this link:http://digiex.net/guides-tutorials/544-configuring-php-under-windows-use-gmail-external-smtp-server-ssl.html Link to comment Share on other sites More sharing options...
tze paul Posted November 3, 2009 Share Posted November 3, 2009 it happened to some others.a guy "halalan" said it can be solved by replay contact-form.php with old one.check here:http://www.prestashop.com/forums/viewthread/25370/general_discussion/contact_us_error_bug Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now