Zend Framework

Unable to configure sendmail transport with Mail resource

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Duplicate
  • Affects Version/s: 1.10.0
  • Fix Version/s: 1.10.1
  • Labels:
    None

Description

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

application.ini
resources.mail.transport.type = "Sendmail"

Exception:

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

Zend_Application_Resource_Mail
// line 128
            case 'Zend_Mail_Transport_Sendmail':
            default:
                $transport = new $transportName($options);

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

Zend_Application_Resource_Mail (fixed)
// line 128
            case 'Zend_Mail_Transport_Sendmail':
                $transport = new $transportName($options['options']);
                break;
            default:
                $transport = new $transportName($options);

Issue Links

Activity

Hide
Hector Virgen added a comment -

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

Show
Hector Virgen added a comment - Forgot to paste the exception: "Unable to send mail. mail() expects parameter 5 to be string, array given"
Hide
Dolf Schimmel (Freeaqingme) added a comment - - edited

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

If not, it will be tonight.

Show
Dolf Schimmel (Freeaqingme) added a comment - - edited Thank you for taking the time to report this issue. Please try trunk, it should be fixed there. If not, it will be tonight.
Hide
Dolf Schimmel (Freeaqingme) added a comment -

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

Show
Dolf Schimmel (Freeaqingme) added a comment - Fixed. Will be released next (mini)release (you can try on trunk).
Hide
Hector Virgen added a comment -

Thanks, works now

Show
Hector Virgen added a comment - Thanks, works now

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: