mecjos Posted November 22, 2010 Share Posted November 22, 2010 Hi friends, there is an error on contact us page while seding message. Message text is "an error occurred while sending message". PHP mail function works on my site but i can't send message on this page. Error comes from if (Mail::Send(intval($cookie->id_lang), ‘contact’, ‘Message from contact form’, array(’{email}’ => $from, ‘{message}’ => stripslashes($message)), $contact->email, $contact->name, $from, (intval($cookie->id_customer) ? $customer->firstname.’ ‘.$customer->lastname : $from))) $smarty->assign(‘confirmation’, 1); else $errors[] = Tools::displayError(‘an error occurred while sending message’);lines in contact-from.phpWhat is the solution of this problem?Thank you.. Link to comment Share on other sites More sharing options...
yangtao66638 Posted December 22, 2010 Share Posted December 22, 2010 Do you solve this problem now?And the same problem occured to me,thank you! Link to comment Share on other sites More sharing options...
mecjos Posted December 22, 2010 Author Share Posted December 22, 2010 No friends, i haven't solved it yet. Link to comment Share on other sites More sharing options...
Rayjak Posted December 22, 2010 Share Posted December 22, 2010 I had PHP working, made several config changes, then the contact page stopped working. Got the error you mentioned. I applied the fixes recommended by others but still no luck.I implemented SMTP and it works great! Link to comment Share on other sites More sharing options...
mecjos Posted December 26, 2010 Author Share Posted December 26, 2010 I tried to implement SMTP but it didn't work, too. Maybe, i used the wrong settings. But i can send test e-mail selecting php mail function and i can receive the test e-mail but i get an error on contact us page. I can't understand its reason. Link to comment Share on other sites More sharing options...
rocky Posted December 27, 2010 Share Posted December 27, 2010 You should use SMTP settings like the following if you are using a Gmail account:SMTP server: smtp.gmail.com Encryption: SSL Port: 465 Login: [email protected] Password: (Enter your password here) Link to comment Share on other sites More sharing options...
raxsix Posted May 16, 2011 Share Posted May 16, 2011 I have an error toError: invalid email subjectwhy is that ? Link to comment Share on other sites More sharing options...
rocky Posted May 16, 2011 Share Posted May 16, 2011 That error message means there are invalid characters <>{} in the mail subject. Check your mails//lang.php files. There's probably bad code in there containing the invalid characters. Link to comment Share on other sites More sharing options...
Recommended Posts