System.Mail in the system service does not appear to work properly on Drupal 6.2 or 6.3. Looking at the code, it doesn't have the right number of parameters for the drupal_mail function in Drupal 6.
Return values when using on Drupal 6.2
Array
(
[id] => tester_ethan.kaplan@wbr.com
[to] => This is a test
[from] => Array
(
)
[language] => This is a test
[params] =>
[subject] =>
[body] =>
[headers] => Array
(
[MIME-Version] => 1.0
[Content-Type] => text/plain; charset=UTF-8; format=flowed; delsp=yes
[Content-Transfer-Encoding] => 8Bit
[X-Mailer] => Drupal
[Errors-To] => ethan@blackrimglasses.com
[Return-Path] => ethan@blackrimglasses.com
[Sender] => ethan@blackrimglasses.com
[Reply-To] => ethan@blackrimglasses.com
[From] => ethan@blackrimglasses.com
)
[result] => 1
)
even when properly submitted on the test form.
On Drupal 6.3, it errors out completely.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | system_service_mail.patch | 2 KB | srhaber |
Comments
Comment #1
ethank commentedcan someone obfuscate my e-mails here :)
Comment #2
srhaber commentedThe issue seems related to the changes made to drupal_mail() function in Drupal 6. The system_service module is still invoking drupal_mail() as if it's Drupal 5.
View the differences here:
http://api.drupal.org/api/function/drupal_mail/5
http://api.drupal.org/api/function/drupal_mail/6
Attached is a quick patch I made to fix this problem. It renames the original mail function to system_service_mailprepare, and adds a new system_service_mail function which adds the needed parameters to the message array. There is probably a more elegant way to fix this permanently, but this should suffice for now.
Comment #3
brmassa commentedEthan and Shaun,
the patch was commited. Its on CVS and soon on the next release
regards,
massa
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.