cancel
Showing results for 
Search instead for 
Did you mean: 

magento2 contact form not sending emails

magento2 contact form not sending emails

I have set email id under Stores->Configuration->General->Contacts->Send Email To, but not getting emails when user submits contact form.
All other emails like order email, invoice are working fine.

8 REPLIES 8

Re: magento2 contact form not sending emails

Hello @neha_goyal1987

 

Can you please elaborate it more. Is it giving any error or redirecting to any page ?

Also if email configuration is set properly in admin you can check form action from code.

Check this file :

app/design/frontend/vendor_name/theme_name/Magento_Contact/templates/form.phtml

 

If my answer is useful, please Accept as Solution & give Kudos.

 

Re: magento2 contact form not sending emails

No error is there. When I submit form, it displays message 'Thankyou for contcaing is...........', but no email is comomg. Also, no error is there in logs.

Re: magento2 contact form not sending emails

Did you check it in the spam?

Re: magento2 contact form not sending emails

Yes. Its very important part in my website. I am stuck here. Not able to find any solution.

Re: magento2 contact form not sending emails

Usually the failure to send mail is caused by the hosting provider setting up sending mail. Please contact the hosting provider for assistance. In addition, you can refer to the extension utility to create contact forms with email magento 2 form builder

Trusted Magento 2 Extensions

Re: magento2 contact form not sending emails

Hi @neha_goyal1987,

 

In admin System -> Config -> General -> Contacts 

Is Send emails to correctly setup and email template also?

Try to send the email to the address filled in "Send Emails To" field using gmail and check if you are able to receive email. 

Apart form this Which SMTP you are using to send email, like Mandril or something else?

 

Re: magento2 contact form not sending emails with ERROR

I'm pretty stuck here myself.  Our contact form always worked fine and now we are getting this error:

"An error occurred while processing your form. Please try again later."

I've gone through the normal processes and still can not figure it out.

What error log does this fall in?

 

Thanks for any help!

Jon

 

Re: magento2 contact form not sending emails with ERROR

A lot of people seem to have different problems with the contact form.

Even if all other emails from the shop are working fine.

 

I created a feature request to add proper error logging,

so these problems can actually be debugged by the shop administrator or an external PHP developer.

 

https://github.com/magento/magento2/issues/23645