Download & Extend

Mimemail API change

Project:Webform
Version:6.x-3.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:claudiu.cristea
Status:closed (fixed)

Issue Summary

In http://drupal.org/node/808518, Mimemail module is preparing an API change. Now mimemail() returns a boolean but after this API change will return an array with the whole message. The actual boolean will be included in return array as key "result".

Fro, PHPDoc:

* @return
*   An array containing the MIME encoded message, including headers and body.

Webform must adapt to the new Mimemail API.

Comments

#1

Status:active» needs review

Here's a patch to be applied after http://drupal.org/node/808518 commit.

AttachmentSize
webform-1087598.patch 975 bytes

#2

Thanks, though could we make an backwards compatible change? It's a serious pain trying to get modules to work together when we have a mid-cycle API change like this. Perhaps a condition like this would work for both versions of MIME Mail?

if ((is_array($message) && $message['result']) || (!is_array($message) && $message)) {

#3

Good point, Nathan. See the attached patch.

AttachmentSize
webform_1087598_02.patch 754 bytes

#4

Status:needs review» fixed

Thanks sgabe, committed. We should have a new Webform release by mid-next week. I really appreciate the heads up.

#5

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here