0

I am working in localhost with Magento 1.7. When I fill the form under the contact us page (myurl/contacts/), I don't receive any email at all.

I have checked Admin -> System -> Genera -> Conctacts, and I have the option enabled, and the email set to my email account. I tried 'Custom Email 1' and 'Custom Email 2'. Still, I receive no email when I fill and send the contacts form.

I already tried to change $this->getFormAction(); and use getUrl() as suggested in other posts, but I obtained no result.

Whenever I create a new user, for example, I receive an email, so I guess that the problem is not sending emails but there must be another problem.

Any ideas on how to solve this?

  • Do you get success message after form submit? Also check your log files for errors if any. – Jaimin Sutariya Feb 28 '17 at 12:41
  • I don't get success message. I checked log and saw no errors. – LeCodeur Feb 28 '17 at 12:45
  • If there is no success message then you need to debug your contacts controller post action code where it is breaking. – Jaimin Sutariya Feb 28 '17 at 12:48
4

Try this, Hope It's helpful for you.

your website is just on localhost, which does not support sending email (some tools allow but not many).

The following solution will help you much with email problem of Magento on localhost, which enables you debug and test email.

Link to download: https://github.com/aschroder/Magento-SMTP-Pro-Email-Extension (Download Magento SMTP Pro Extension by Ashley Schroder (free)

For More details,kindly visit below URLs:-

http://www.mage-world.com/blog/how-to-set-up-sending-emails-on-localhost-for-magento.html

  • Thank you. I already saw this but didn't try because whenever I create a new user an email is sent, so I assume localhost is capable of sending emails. I am using WAMP. I got exception 'Zend_Mail_Transport_Exception' with message 'Unable to send mail. mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()' in C:\wamp64\www\magento\lib\Zend\Mail\Transport\Sendmail.php:137 – LeCodeur Mar 3 '17 at 9:48
  • Any other suggestion? This didn't work for me :\ – LeCodeur Aug 29 '17 at 12:52
  • @LeCodeur You can not send mail from localhost i mean on WAMP server...magento doesn't support mail functionality on localhot. – Dhrumin Sep 1 '17 at 9:04
  • Please try my below My Anser @LeCodeur magento.stackexchange.com/a/191579/18639 – Randhir Yadav Sep 1 '17 at 10:01
  • I agree but if make some changes, please see below my new answer .. then you can send mail to magento @Dhrumin – Randhir Yadav Sep 1 '17 at 10:03
0

You are using wrong SMTP settings for gmail. The correct ones are:

In php.ini

[mail function]
;SMTP = localhost
;sendmail_from = me@example.com
sendmail_path = "c:\sendmail\sendmail.exe -t -i"

In sendmail.ini

[sendmail]
smtp_server=smtp.gmail.com
smtp_port=587
smtp_ssl=tls
auth_username=me@example.com
auth_password=**********

Remeber:

If you have enabled 2 step authentication, you have to create an application specific password.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.