ZF-9033: Unable to configure sendmail transport with Mail resource

Issue Type: Bug Created: 2010-01-31T20:00:17.000+0000 Last Updated: 2010-02-01T12:47:23.000+0000 Status: Resolved Fix version(s): - 1.10.1 (10/Feb/10)

Reporter: Hector Virgen (djvirgen) Assignee: Dolf Schimmel (Freeaqingme) (freak) Tags: - Zend_Application_Resource

Related issues: - ZF-9011



Configuring the sendmail transport with the Mail resource causes it to be constructed incorrectly, which ends up throwing an exception when used:

<pre class="highlight">
resources.mail.transport.type = "Sendmail"


Zend_Mail_Transport_Sendmail expects a string as it's constructor argument, but the Zend_Application_Resource_Mail resource passes in an array.

<pre class="highlight">
// line 128
            case 'Zend_Mail_Transport_Sendmail':
                $transport = new $transportName($options);

One solution would be to implement the sendmail case and use a single option to pass in to the constructor:

<pre class="highlight">
// line 128
            case 'Zend_Mail_Transport_Sendmail':
                $transport = new $transportName($options['options']);
                $transport = new $transportName($options);


Posted by Hector Virgen (djvirgen) on 2010-01-31T20:01:18.000+0000

Forgot to paste the exception: "Unable to send mail. mail() expects parameter 5 to be string, array given"

Posted by Dolf Schimmel (Freeaqingme) (freak) on 2010-02-01T08:38:05.000+0000

Thank you for taking the time to report this issue. Please try trunk, it should be fixed there.

If not, it will be tonight.

Posted by Dolf Schimmel (Freeaqingme) (freak) on 2010-02-01T12:07:24.000+0000

Fixed. Will be released next (mini)release (you can try on trunk).

Posted by Hector Virgen (djvirgen) on 2010-02-01T12:47:22.000+0000

Thanks, works now :)

Have you found an issue?

See the Overview section for more details.


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

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