Error Occurred When Sending The Email . Prestashop
Contents |
to change PrestaShop database name and password Fix PrestaShop contact form not sending mails. How to reset the admin password in PrestaShop Recent Commentspolosat on Fix prestashop paypal error occurred PrestaShop contact form not sending mails.George on Fix PrestaShop contact form not
Myob An Error Occurred Sending Email
sending mails.Archives May 2016 March 2016 February 2016 Categories main Fix PrestaShop contact form not sending mails. If prestashop error: please check your configuration you are using SMTP in your shop email configuration, then you could encounter the following problem - you are not getting e-mail notifications about new messages from contact form. And all
Fsockopen Returned Error Number 0 And Error String
other mails are sending fine. It occurs because PrestaShop is sending mails from customer's name, but using your SMTP server and your e-mail account. You could contact your hosting support or your e-mail provider support, maybe they'll offer you some solution. If not, you can fix this problem on PrestaShop level. Solution: 1. The easiest way is sending mail via PHP mail() functon. You can change e-mail settings in the Back Office (Advanced Parameters -> E-mail). Mails sent in this way very often fall into spam. And it is very bad of course. 2. The other way - a small code modification. All files can be edited via FTP. File paths are relative to the site root. All changes should be implemented in the override class: /override/controllers/ContactController.php In the file /controllers/ContactController.php you can find the function postProcess(). And at the end of this function find the following code: if (!Mail::Send($this->context->language->id, 'contact', Mail::l('Message from contact form').' [no_sync]', $var_list, $contact->email, $contact->name, null, null, $file_attachment, null, _PS_MAIL_DIR_, false, null, null, $from) || !Mail::Send($this->context->language->id, 'contact_form', ((isset($ct) && Validate::isLoadedObject($ct)) ? sprintf(Mail::l('Your message has been correctly sent #ct%1$s #tc%2$s'), $ct->id, $ct->token) : Mail::l('Your message has been correctly sent')), $var_list, $from, null, null, null, $file_attachment, null, _PS_MAIL_DIR_, false, null, null, $contact->email)) { $this->errors[] = Tools::displayError('An error occurred while sending the message.'); } This code is for sending mails to a customer and to an admin. This example
uses PHP mail() function by default to send emails e.g. when you reset your password. If you do not receive e-mails from your shop you can contact your system administrator and ask to enable PHP mail() function or you can configure Prestashop to use SMTP server. We will use Gmail SMTP server in this example. First of all you must have Gmail account or you can create one here. Keep in mind that people will see your Gmail address when they receive emails from your shop. When you have Gmail account, login to your Prestashop back office and go to Preferences->E-mail. Select Set my own SMTP parameters. For advanced users ONLY: Preferences->E-mail http://presta.site/blog/en/fix-prestashop-contact-form-not-sending-mails/ Now fill the expanded form: Mail domain: - www.yourshop.tld (change it according your websites address) or you can leave it blank. SMTP server: smtp.gmail.com SMTP user: your Gmail email. SMTP password: your Gmail email passowrd. Encryption: SSL Port: use 465 Click Save. You can read more about Gmail SMTP setting here. Now lets test your e-mail configuration. Look beneath email settings you entered, enter your e-mail and pres Send an e-mail test: Test your e-mail configuration http://www.prestadocumentation.com/prestashop-does-not-send-emails/ If your settings are correct Prestashop will show you success message. After that go to your inbox and check your emails. If you do not see test message from your shop check spam area also - sometimes such mails goes directly to a spam area. If you see error message check your settings. Also make sure your settings are entered without white spaces. I tried it myself and everything worked perfectly. If you have some questions write me an email: donatas@invertus.lt Donatas Lomsargis 14 thoughts on “Prestashop does not send emails and how to use Gmail SMTP server?” chnkax81 says: July 21, 2011 at 07:44 I did this but but it wont work :(( plz help me Reply Donatas Lomsargis says: July 22, 2011 at 08:36 Do you still have this problem? If you could not resolve the problem can you provide back office access? Reply Gustavo Diaz says: July 23, 2011 at 01:21 Not works for me. Reply Gustavo says: August 15, 2011 at 13:01 it didn`t work for me either.. any ideas? Reply dnaranjor@gmail.com says: August 20, 2011 at 23:06 presto-changeo.comprestashop.comDoesn't work for me, either. I've tried using all possible combinations in each input field without any success, also. I have Thunderbird configured to send emails using the neccessary credentials, so I'm quite sure everything is OK. Also, I've tried the solution posted in http://www.presto
från GoogleLogga inDolda fältSök efter grupper eller meddelanden
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up PHP Mail() Contact-us form works fine if entering a Gmail sending address, but not with Yahoo [duplicate] up vote -1 down vote favorite This question is an exact duplicate of: Reconfiguring PHP Mail() Smarty Contact Form 1 answer I've setup an ecommerce site using Prestashop and when testing their contact form, I found that I was not receiving any messages if user enters Yahoo email address as the senders address. I have no problems, however, if the user enters a Gmail address. Prestashop is set up currently to use the PHP Mail() function for the contact form. What could be the problem and what solutions could I look at as I obviously need to receive mails from everyone, not just those with gmail addresses. The following is the code in the contact-form.php page:- 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 (intval($cookie->id_customer)) $customer = new Customer(intval($cookie->id_customer)); if (Mail::Send(intval($cookie->id_lang), 'contact', 'Message from contact form', array('{email}' => $_POST['from'], '{message}' => s