Closed (fixed)
Project:
Webform
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Dec 2009 at 08:02 UTC
Updated:
24 Feb 2010 at 03:50 UTC
Jump to comment: Most recent file
If you want to use hook_mail_alter to modify a confirmation email sent by webform, your somemodule_mail_alter function won't be able to determine which webform was filled out for a given email; all it can determine is that the id is "webform_submission", which is the same for all webform emails. (I suppose you could play games with the subject or to email address, but that's not very sustainable or clean.) So can we please add a node id parameter in the drupal_mail call? The following patch should do just that.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | webform_email_params.patch | 1.04 KB | quicksketch |
| #1 | webform.module.patch | 1.43 KB | shaisachs |
| webform.module.patch | 1.4 KB | shaisachs |
Comments
Comment #1
shaisachs commentedDon't know why I didn't think of this before, but having the sid in the params array would also be great. Here's a patch for that.
Comment #2
quicksketchSince it's relatively cheap in PHP to pass large objects around, I've taken your suggestion and done one step further, actually passing the entire node and submission variables to drupal_mail(). However because I'm trying to deprecate 2.x as quickly as possible, I've only made this change to the 3.x branch. It's quite stable if you're interested in testing it, otherwise I'd update your code to use 'node' and 'submission' instead and work with your patched version until you're able to upgrade.