Closed (fixed)
Project:
Webform
Version:
5.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Jun 2007 at 03:57 UTC
Updated:
9 Jun 2010 at 18:59 UTC
Would it be hard to have BCC option? Something similar to "CC Submission" checkbox. Thanks
Comments
Comment #1
gpk commentedYou may be able to implement this pro tem using hook_mail_alter in a custom module by adding the required BCC recipients to $headers. See http://api.drupal.org/api/function/hook_mail_alter/5
Comment #2
seakayjay commentedThank you for your reply. I got it working already.
Comment #3
solutionsphp commentedCare to share your code, ckjian? Thanks!
Comment #4
quicksketchAs a final word on this feature request, rather than using CC or BCC at all, in the 2.x branch of webform emails are sent individually rather than as a single email. I believe this should solve the need for BCC, as a user can be sent a unique email rather than being tagged onto the single one that used to be sent.
Comment #5
gpk commentedThanks for the update, quicksketch.
gpk.
Comment #6
xqi commentedhi quicksketch,
my webform allows users to choose from 3 different options. for each option, there are dedicated group of people receiving the submissions. (one option matches multiple email address) however, within the group, i really want each email recipient to receive the emails without knowing who are those other recipients.
I tried to put multiple email addresses into each option (webform 2.0), the email is sent out, but it discloses all email addresses of that option to all recipients.
For my situation, do you think i have to use a dummy email address for each option and then use mail_alter to add BCC fields to the mail header?
Any suggestions?
Thank you.
Xin
Comment #7
quicksketchxqi, you can make a separate hidden field for each address you wish to receive to receive an email. Emails are now sent individually (by component) so each user will see the email as being addressed to only them.
Comment #8
xqi commentedthanks for the quick reply.
but i could not figure out how to apply condition to the hidden fields. seems all hiden fields receive emails once they are enabled.
if user select 1, then i want to send emails to email1@example1.com, email2@example1.com, email3@example1.com
if user select 2, then i want to send emails to email1@example2.com, email2@example2.com, email3@example2.com
and i want to make sure that email1@example2.com does not know email2@example1.com, email1@example1.com also received this email.
Comment #9
quicksketchAhh, hmm. You've passed where webform can do this for you "automatically". Instead you'll need to leverage the additional submission code, because this involves more logic than webform can provide out of the box.
Webform adds a variable to the node object called "additional_emails" during the submission process. By adding more emails to this property, emails will be sent out to additional people.
So something like this would send an email to another user even without a component.
You can accomplish what you want with this code that checks the value of a select list, then makes a list of addresses which will receive emails. You'll need to adjust the code for your select list and email addresses of course.
Comment #10
xqi commentedthank you quicksketch!
I added the code to additional processing and it works for me! I only need change the node->webform[additional_emails] based on the selected option. this is great and i do not need even put any email address to html page which could be picked up by the spammers.
thanks again for the great module!
Comment #11
quicksketchCool, let's close this back up as we accidentally turned this into a support request. Please open another issue for any other difficulties.
Comment #12
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #13
rhlowe commented> in the 2.x branch of webform emails are sent individually rather than as a single email
Is this still the case? In my testing it seems that the described behavior is not true.