8

I keep getting this error when trying to submit my contact form: "Unable to submit your request. Please, try again later"

I'm using default Magento contact form.

Does anyone know where to start with this? It was working a few days ago and now it's not.

I've also been having issues with sales emails sending.

Thanks in advance.


In the example below I tried to go to an order and click "send email" then I tired to fill out the contact form on the front end...

# root path of bitnami installation replaced with [root]

2013-08-23T11:06:05+00:00 ERR (3): 
exception 'Zend_Mail_Transport_Exception' with message 'Unable to send mail. ' in [root]/lib/Zend/Mail/Transport/Sendmail.php:137
Stack trace:
#0 [root]/lib/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Sendmail->_sendMail()
#1 [root]/lib/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#2 [root]/app/code/core/Mage/Core/Model/Email/Template.php(454): Zend_Mail->send()
#3 [root]/app/code/core/Mage/Core/Model/Email/Template.php(506): Mage_Core_Model_Email_Template->send(Array, Array, Array)
#4 [root]/app/code/core/Mage/Core/Model/Email/Template/Mailer.php(79): Mage_Core_Model_Email_Template->sendTransactional('sales_email_ord...', 'sales', Array, Array, Array, '1')
#5 [root]/app/code/core/Mage/Sales/Model/Order.php(1321): Mage_Core_Model_Email_Template_Mailer->send()
#6 [root]/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php(130): Mage_Sales_Model_Order->sendNewOrderEmail()
#7 [root]/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Adminhtml_Sales_OrderController->emailAction()
#8 [root]/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('email')
#9 [root]/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#10 [root]/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#11 [root]/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#12 [root]/index.php(87): Mage::run('', 'store')
#13 {main}
2013-08-23T11:07:48+00:00 ERR (3): 
exception 'Zend_Mail_Transport_Exception' with message 'Unable to send mail. ' in [root]/lib/Zend/Mail/Transport/Sendmail.php:137
Stack trace:
#0 [root]/lib/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Sendmail->_sendMail()
#1 [root]/lib/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#2 [root]/app/code/core/Mage/Core/Model/Email/Template.php(454): Zend_Mail->send()
#3 [root]/app/code/core/Mage/Core/Model/Email/Template.php(506): Mage_Core_Model_Email_Template->send('christinarule@g...', NULL, Array)
#4 [root]/app/code/core/Mage/Contacts/controllers/IndexController.php(104): Mage_Core_Model_Email_Template->sendTransactional('contacts_email_...', 'custom2', 'example@g...', NULL, Array)
#5 [root]/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Contacts_IndexController->postAction()
#6 [root]/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('post')
#7 [root]/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#8 [root]/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#9 [root]/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#10 [root]/index.php(87): Mage::run('', 'store')
#11 {main}
6
  • which error? ^^ Aug 23, 2013 at 10:01
  • Please share the error and at least the extension you're using for the contact form (default Magento I guess?) Aug 23, 2013 at 10:02
  • @Fabian Blechschmidt sorry I forgot to include. The error is "Unable to submit your request. Please, try again later" Aug 23, 2013 at 10:32
  • @Sander Mangel sorry added above. Using default. Aug 23, 2013 at 10:35
  • 2
    turn on the logging (system->configuration->developer->log settings), then try again. You should see your error in var/log/exception.log or var/log/system.log. If the error message does not help you, post it in the question.
    – Marius
    Aug 23, 2013 at 10:42

3 Answers 3

4

To expand on Marius his answer, if it's the mail server I suggest contacting the hosting company to set up a mailing server on your server or use Aschroder's SMTP extension to configure a SMTP connection

14
  • we do have that extension installed. Would I also need to contact our hosting company and have them set something else up? Aug 23, 2013 at 11:49
  • If you already have this extension running, can you check if the SMTP server you're connecting to is still available? For example by using outlook to send an email via this SMTP server Aug 23, 2013 at 11:51
  • @Christina - I was about to suggest this too based on the error log. The bitnmai stack and filepaths makes me think it might be on AWS though? If it's on AWS you might want to look at SES aws.amazon.com/ses - I've used that before with Ashley Shroder's extension on a Magento site and it works fine.
    – McNab
    Aug 23, 2013 at 12:06
  • @sander-mangel great idea! I did test this an the SMTP is working correctly on my Apple Mail. It is a 'at'bellsouth.net account I don't know if that has anything to do with it? It was working before with the exact email so this is puzzling. Aug 23, 2013 at 13:13
  • @McNab We are hosting on an amazon server. Is the service you're talking about an additional fee? Aug 23, 2013 at 13:14
2

I had this exact same problem and error message. I also had the excellent SMTP Pro installed.

When I ran the SMTP self test via admin it sent the email successfully but still gave me a red error response. Also it would fail when sending an enquiry via the contact form.

For me, the problem was a conflict with the Ebizmarts MageMonkey extension.

According to the aschroder_smtppro.log

2014-10-10T00:09:57+00:00 DEBUG (7): Running SMTP Pro Self Test
2014-10-10T00:09:57+00:00 DEBUG (7): Checking config re-writes have not clashed.
2014-10-10T00:09:57+00:00 DEBUG (7): Detected overwrite conflict: Ebizmarts_Mandrill_Model_Email_Template
2014-10-10T00:09:57+00:00 DEBUG (7): Using Google Apps/Gmail Transport.
2014-10-10T00:09:57+00:00 DEBUG (7): Skipping raw connection test for non-SMTP options.
2014-10-10T00:09:57+00:00 DEBUG (7): Actual email sending test...
2014-10-10T00:09:57+00:00 DEBUG (7): Zend_Mail Object

As we aren't even using the Mandrill component of MageMonkey, removing the Ebizmarts_Mandrill.xml from /app/etc/modules resolved this conflict and now everything is working as expected.

1

The answer is simple. You don't have a mail server configured, or you are not linked correctly.
Or your e-mail template is wrong. If you have changed the e-mail template for the contact form try with the default one. If that works check the differences between the default one and yours.
[EDIT] The exception is thrown if something gors wrong in Zend_Mail_Transport_Sendmail::_sendMail() around these lines:

$result = mail(
            $this->recipients,
            $this->_mail->getSubject(),
            $this->body,
            $this->header,
            $this->parameters); 

IF you say the template file is there then the problem is with the mail server. Try to log the values in the code above, and "manually" test the mail function with the values you log and with other test values. This way you can see of the values are wrong or the mail server has a problem.

6
  • thanks so much. It says I am using "default template from local" where can I view this to confirm it's there and in the right order? Aug 23, 2013 at 11:38
  • @ChristinaRule. It should be in app/locale/{lang_ISO}/template/email/contact_form.html
    – Marius
    Aug 23, 2013 at 13:58
  • Yup it's there all right....mhhh so this makes me think it's either something with our Amazon server or something with the @bellsouth.net Aug 23, 2013 at 17:04
  • @ChristinaRule. I've added some more info on the error. It's not really an answer but should help you debug the issue.
    – Marius
    Aug 23, 2013 at 17:34
  • thanks so much. I just tried a gmail address and that isn't working either. Would it be a mail server issue or is it possible it's something with the actual amazon server? This is so crazy it's taken this long to make a form work! Thanks for all your help @Marius Aug 23, 2013 at 17:58

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.