Reported initially by fajerstarter in the actions usability thread, and further investigated by chx.
When you create a "Send e-mail to.." action, it will appear to fire and do everything correctly but in fact won't. The problem comes in at a drupal_mail call in system.module that looks like it was never properly updated for i18n:
if (drupal_mail('action_send_email', $recipient, $subject, $body, $from )) {
The parameters of drupal_mail have changed, so that the first parameter is a module name. Fixing this looks to be a bit involved; I think we need to replicate what user.module is doing with its mail function....
*cough* tokens in core for 7.x *cough* ;)
Comments
Comment #1
anders.fajerson commentedI noticed that when creating the first user this error is invoked as well, but not when creating additional users as admin and checking "notify user" or registering as a user on the site.
Comment #2
chx commentedAt the end of the day, it's not much more than just rearranging the code already found in system_send_email_action . However, the update module docs happily ignore this little tidbit... I will do something.
Comment #3
chx commentedand the patch.
Comment #4
anders.fajerson commentedAction now works but I still get the error when creating user 1.
Comment #5
webchickWell this issue isn't to fix the user 1 creation. Probably a separate issue for that.
Comment #6
anders.fajerson commentedOk. New issue for that: http://drupal.org/node/174224
Comment #7
gábor hojtsyPatch looks generally good.
- Let's have an 'implementation of hook_mail()' phpdoc on the new function.
- I would not use the subject and body variables since they need to be transformed directly anyway.
- I also don't understand why you append to $message['subject']
Comment #8
chx commentedNo functionality change, the concerns addressed setting back to RTBC.
Comment #9
gábor hojtsyOK, you only concatenate to an empty string and add an item to an empty array, so if that style was used, we can just as well follow that style. Thanks, committed.
Comment #10
(not verified) commented