Just dig.
Your Exception is thrown here: app/code/core/Mage/Contacts/controllers/IndexController.php:107
therefore $mailTemplate->getSentSuccess()
must be false
It is set false
here: app/code/core/Mage/Core/Model/Email/Template.php:479
but the mail is going out, so this code is executed and send()
returns false
:
app/code/core/Mage/Core/Model/Email/Template.php:506
$this->setSentSuccess($this->send($email, $name, $vars));
this means, this code is executed:
app/code/core/Mage/Core/Model/Email/Template.php:453
try {
$mail->send();
$this->_mail = null;
}
catch (Exception $e) {
$this->_mail = null;
Mage::logException($e);
return false;
}
Most likely Zend_Mail_Transport_Sendmail
is used, so it continues here:
\Zend_Mail_Transport_Sendmail::_sendMail
What ever happens there, I would think throw new Zend_Mail_Transport_Exception('Unable to send mail. ' . $this->_errstr);
is thrown.
This means for me, you should add some logging here \Zend_Mail_Transport_Sendmail::_handleMailErrors
,because of the catched and newly thrown Exception (app/code/core/Mage/Core/Model/Email/Template.php:453
) all the errors descriptions are gone.
But the error should be logged in exception.log
. Did you check it? If not, read this: Fundamentals of debugging Magento
Best Answer
You can see this message inside Post controller of contact module.
This message is display because your mail is not working. You have to configure your mail setting inside localhost for works it proper.
There is not SMTP configured on your localhost so mail is not sending and you have faced error like above.You can refer below links to configure mail sending.
Gmail setup in localhost
Or
This module also works for gmail setup