ZF-2534: A exception was threw in the Zend_Mail_Transport_Smtp's method __destruct.

Description

First, look here http://bugs.php.net/bug.php?id=33598&edit=1 this is the php's bug.

And in the line 139:


    public function __destruct()
    {
        if ($this->_connection instanceof Zend_Mail_Protocol_Smtp) {
            $this->_connection->quit();
            $this->_connection->disconnect();
        }
    }

We will get: Fatal error: Exception thrown without a stack frame in Unknown on line 0

The real exception is: No connection has been established to smtpserver

Comments

This issue may be outdated. I can not find the functions that are pointed out.

I'm having the same problem (Fatal error: Exception thrown without a stack frame in Unknown on line 0) with version 1.0.4.

Class: Zend_Mail_Transport_Smtp Line: 139

I guess the connection is already closed and the call to:

        $this->_send('QUIT');

At Zend_Mail_Protocol_Smtp, line 364, throws an exception (same Class, line 260):

protected function _send($request)
{
    if (!is_resource($this->_socket)) {
        require_once 'Zend/Mail/Protocol/Exception.php';
        throw new Zend_Mail_Protocol_Exception('No connection has been established to ' . $this->_host);
    }
...

reopen it for Marcos ;-)

Memo: Zend_Mail_Protocol_Abstract has _send() .

I search over SVN trunk today and find same problem was fixed at SVN r6661 (2007/10/20).

The change was done for ZF-2075 . The issue was solved in Ver 1.5.0.

I suggest you update your version to the latest to solve this issue.