ZF-10864: Zend_Mail with SMTP Authentication

Issue Type: Bug Created: 2010-12-23T00:29:21.000+0000 Last Updated: 2011-01-05T04:09:53.000+0000 Status: Open Fix version(s): Reporter: Habeeb Raja (habeeb) Assignee: Dolf Schimmel (Freeaqingme) (freak) Tags: - Zend_Mail

Related issues: Attachments:


Hi All, I'm using Zend_Mail with SMTP authentication. while running that application it returns an error.(i.e, Application Error.). If I use the same code without SMTP authentication, its working fine. What i need to do...



Posted by Ryan Mauger (bittarman) on 2010-12-23T02:05:58.000+0000


Could you supply code to reproduce your issue, currently there is not enough info to know if this is a support request, or an actual bug with the framework.

If this is a support request, then this issue should be closed, and the question directed to either the fw-general mailing list, of #zftalk on IRC.

Posted by Ramon Henrique Ornelas (ramon) on 2010-12-23T02:38:36.000+0000

Assigned component and the mantainer.

Posted by Craig Carnell (luckyknight) on 2011-01-05T04:09:48.000+0000

I am using the Zend Framework with Magento

The standard getMail function in Magento doesn't support SMTP so I have replaced with the code below. It was working in the past, but now I am getting an exception.

I need to use SMTP as the mail server is another machine.

Code below:

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( //'ssl' => 'ssl', //optional 'port' => $my_smtp_port, //optional - default 25 'auth' => 'login', 'username' => 'xxx', 'password' => 'xxx' );

$transport = new Zend_Mail_Transport_Smtp('xxx', $config); Zend_Mail::setDefaultTransport($transport); $this->_mail = new Zend_Mail('utf-8'); } return $this->_mail; }

Stack trace below:

2010-12-13T15:07:24+00:00 ERR (3): exception 'Zend_Mail_Protocol_Exception' with message 'Operation not permitted' in /usr/home/xxx/domains/ Stack trace:

0 /usr/home/xxx/domains/ Zend_Mail_Protocol_Abstract->_connect('tcp://')

1 /usr/home/xxx/domains/ Zend_Mail_Protocol_Smtp->connect()

2 /usr/home/xxx/domains/ Zend_Mail_Transport_Smtp->_sendMail()

3 /usr/home/xxx/domains/ Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))

4 /usr/home/xxx/domains/ Zend_Mail->send()

5 /usr/home/xxx/domains/ Mage_Core_Model_Email_Template->send('orders@xxx...', NULL, Array)

6 /usr/home/xxx/domains/ Mage_Core_Model_Email_Template->sendTransactional('contacts_email_...', 'support', 'orders@xxx...', NULL, Array)

7 /usr/home/xxx/domains/ Mage_Contacts_IndexController->postAction()

8 /usr/home/xxx/domains/ Mage_Core_Controller_Varien_Action->dispatch('post')

9 /usr/home/xxx/domains/ Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))

10 /usr/home/xxx/domains/ Mage_Core_Controller_Varien_Front->dispatch()

11 /usr/home/xxx/domains/ Mage_Core_Model_App->run(Array)

12 /usr/home/xxx/domains/ Mage::run('', 'store')

13 {main}

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.