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. Feb 28, 2017 at 12:41
  • I don't get success message. I checked log and saw no errors.
    – LeCodeur
    Feb 28, 2017 at 12:45
  • If there is no success message then you need to debug your contacts controller post action code where it is breaking. Feb 28, 2017 at 12:48

2 Answers 2


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:-


  • 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, 2017 at 9:48
  • Any other suggestion? This didn't work for me :\
    – LeCodeur
    Aug 29, 2017 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, 2017 at 9:04
  • Please try my below My Anser @LeCodeur magento.stackexchange.com/a/191579/18639 Sep 1, 2017 at 10:01
  • I agree but if make some changes, please see below my new answer .. then you can send mail to magento @Dhrumin Sep 1, 2017 at 10:03

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

In php.ini

[mail function]
;SMTP = localhost
;sendmail_from = [email protected]
sendmail_path = "c:\sendmail\sendmail.exe -t -i"

In sendmail.ini

[email protected]


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 and acknowledge you have read our privacy policy.

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