jcadima
6/18/2015 - 6:52 PM

Fix Magento Contact Form submission Error NOT FOUND

Fix Magento Contact Form submission Error NOT FOUND

<?php
// ref: http://www.magentech.com/documentation/fixed-contact-form-not-sending-emails/

http://stackoverflow.com/questions/18415240/magento-contact-form-email-is-not-received-7

 File Location:
app/design/frontend/mthoro/default/template/contacts/form.phtml

// This will fix the path not found for /contacts/index/post/


 Change:

<form action="<?php echo $this->getFormAction(); ?>" id="contactForm" method="post">

 To:
<form action="<?php echo Mage::getUrl(); ?>/contacts/index/post/" id="contactForm" method="post">

NOTE:  Mage::getUrl() will get the correct path for any site root or subfolder and append 
to /contacts/index/post , thats the path that fails if  $this->getFormAction() is used.


If your site use the url is: https:// Replace the above form tag with:
<?php
   $url = Mage::getUrl();
   if(isset($_SERVER['HTTPS']))
   {
    $url = str_replace ('http://', 'https://', $url);
   }
?>
<form action="<?php echo Mage::getUrl(); ?>contacts/index/post/" id="contactForm" method="post">