0

I am running magento 1.9.1 website on AWS EC2 Ubuntu machine. Customer registration emails are going out but transnational emails are not going.

I configure SMTP by AWS SES service with SMTP Pro extension. I got below error on email sending

2017-07-29T06:54:31+00:00 ERR (3): 
Zend_Mail_Protocol_Exception: Must issue a STARTTLS command first
 in /var/www/html/lib/Zend/Mail/Protocol/Abstract.php:431
Stack trace:
#0 /var/www/html/lib/Zend/Mail/Protocol/Smtp/Auth/Login.php(91): Zend_Mail_Protocol_Abstract->_expect(Array)
#1 /var/www/html/lib/Zend/Mail/Protocol/Smtp.php(217): Zend_Mail_Protocol_Smtp_Auth_Login->auth()
#2 /var/www/html/lib/Zend/Mail/Transport/Smtp.php(200): Zend_Mail_Protocol_Smtp->helo('localhost')
#3 /var/www/html/lib/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
#4 /var/www/html/lib/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#5 /var/www/html/app/code/local/Aschroder/SMTPPro/Model/Email/Template.php(132): Zend_Mail->send(Object(Zend_Mail_Transport_Smtp))
#6 /var/www/html/app/code/core/Mage/Core/Model/Email/Template.php(508): Aschroder_SMTPPro_Model_Email_Template->send('sharma.sdaf...', Array, Array)
#7 /var/www/html/app/code/core/Mage/Core/Model/Email/Template/Mailer.php(83): Mage_Core_Model_Email_Template->sendTransactional('sales_email_ord...', 'sales', Array, Array, Array, '1')
#8 /var/www/html/app/code/core/Mage/Sales/Model/Order.php(1354): Mage_Core_Model_Email_Template_Mailer->send()
#9 /var/www/html/app/code/core/Mage/Sales/Model/Order.php(1369): Mage_Sales_Model_Order->queueNewOrderEmail(true)
#10 /var/www/html/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php(139): Mage_Sales_Model_Order->sendNewOrderEmail()
#11 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Sales_OrderController->emailAction()
#12 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('email')
#13 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#14 /var/www/html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#15 /var/www/html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#16 /var/www/html/index.php(87): Mage::run('', 'store')
#17 {main}

cron_schedule table is also empty

  • set Queue Usage to never to SMPT Pro and try – Nikunj Vadariya Jul 29 '17 at 7:08
  • Yes, I have set that to never. I tried with custom smtp and SES both methods, but same result. – urfusion Jul 29 '17 at 7:11
  • Could you please check the Apache error log – Nikunj Vadariya Jul 29 '17 at 7:12
  • for what should I look into log? – urfusion Jul 29 '17 at 7:13
0

Described config is functional, for viewing changes in scripts is needed to turn off Magento compiler an clean /includes/folder.

There is changed email function supporting Google Gmail or Google Apps:

1 copy file "app/code/core/Mage/Core/Model/Email/Template.php" to "app/code/local/Mage/Core/Model/Email/Template.php"

2 In file app/code/local/Mage/Core/Model/Email/Template.php change function:

public function getMail()
{
    if (is_null($this->_mail)) {
    $my_smtp_host = Mage::getStoreConfig('system/smtp/host');
    $my_smtp_port = Mage::getStoreConfig('system/smtp/port');
    $config = array(
              'port' => $my_smtp_port,
              'auth' => 'login',
              'ssl' => 'tls',
              'username' => 'youremail@gmail.com',
              'password' => 'Abc'
              );
     $transport = new Zend_Mail_Transport_Smtp($my_smtp_host,$config);
     Zend_Mail::setDefaultTransport($transport);         





        $this->_mail = new Zend_Mail('utf-8');
    }
    return $this->_mail;
}

Disable compiler, rename folder /includes/ in magento root and clear cache

Please check following post related for same issue,Hope it's helpful for you.

https://stackoverflow.com/a/5265792/4373980

https://stackoverflow.com/a/6453718/4373980

https://magento.stackexchange.com/a/76838/18639

Another solution try this:-

> Try to disabled TLS Support or add valid certificate into smtp mail program.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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