Problems with Contact form

Featured Image

Couple of days ago I had a problem with contact form not working in Magento Professional Magento was throwing error “Unable to submit your request. Please, try again later” after submitting form. Of course all requested fields was filled. Here I will explain what needs to be done if you have same problems.

First thing, which would probably solve the problem, was to change following function of app/code/core/Mage/Core/Model/Email/Template.php

  public function setReplyTo($email)
        $this->getMail()->addHeader('Reply-To', $email);
        return $this;


public function setReplyTo($email)
        return $this;

You can override this function in a dirty way by creating same folder hierarchy to Template.php file in your app/code/local or creating separate module (Magento way which will avoid possible overwriting when upgrading to newer version of Magento)

Additional problem solving steps are:

  1. Create new CMS page and call form.phtml from there. You can do this by following:
    • Create new CMS page
    • URL key value: contacts
    • Content value:
      < !– CONTACT FORM –>
      {{block type=’core/template’ name=’contactForm’ template=’contacts/form.phtml’}}
      < !– END OF CONTACT FORM –>
      P.S. Watch to have single quotes!
  2. Check if form action attribute is set right. Sometimes this can generate a problem. Action attribute value should point to: Originally value for action attribute is
    <?php echo $this->getFormAction(); ?>

    but you can try it to set it manually to “”

  3. Check if you maybe missed configuration settings for enabling email sending functionalities.
  4. Try to change “Sending emails to” to some other email which do not have same email domain as your Magento website. Some hosts can produce problem if “Sending from” email is from same host provider as the “Sending to” email.
  5. Create new transaction email for Contact form transactional email and name it differently than default.

Hope this helps someone!

About Vanja Devcic

Frontend Developer

Vanja is Certified Frontend Developer, designer in soul and in job, who likes to use his skills to change the world through digital experience creating responsive, multi-languages web sites

Read more posts by Vanja / Visit Vanja's profile


  1. Hello,
    I experience the same situation as described by Ryan.

    This fix doesn’t work on Entreprise 1.9

    Any suggestion?

  2. Hello,

    I saw this fix on another site that pointed out it might break all other emails. This is the case for us, as this did not resolve the stated issue with contact_us and made it so that no other emails came out either.

    Any other options? There are so many threads on this error, and I have tried them all.

    I’m on Enterprise Magento ver.

  3. @Kevin $this->getMail() returns Zend_Mail object. Method “setReplyTo($email)” is not called on Mage_Core_Model_Email_Template, therefore that’s not an infinite loop.

  4. @Ana
    You were right. There was a typo, but corrected really fast. Thank you for input 😉

  5. public function setReplyTo($email)
    return $this;

    Surely thats an infinite loop???

  6. It was originally written : “Problems with Contact from”, instead of: “Problems with Contact form”. I noticed that so I wrote, and few hours later, somebody changed that. 🙂 Maybe because of my comment or somebody else also noticed that. 😉


  7. Vanja, I hoticed one small mistake in your headline. I suppose that you wanted to write: “Problems with Contact form”. 😉

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <blockquote cite=""> <code> <del datetime=""> <em> <s> <strike> <strong>. You may use following syntax for source code: <pre><code>$current = "Inchoo";</code></pre>.