Skip Navigation

[Résolu] ‘bcc’ field in email notifications isn’t behaving as as ‘blind copy’ field

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem: When I receive emails from automatic notifications, I am able to see the BCC email addresses that were added to the notification. It should not be possible to see these email addresses.

Solution: If the account used to as the "from" address is linked to the email recipient in any way, it may be possible to see the BCC address. In this case, I suspect the SMTP plugin used to send the mails is connected to an account that is connected to the email recipient somehow. Therefore, Gmail knows that the recipient is also the author, and shows the BCC information.

This support ticket is created Il y a 6 années et 3 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Ce sujet contient 4 réponses, a 2 voix.

Dernière mise à jour par julieP Il y a 6 années et 2 mois.

Assisté par: Christian Cox.

Auteur
Publications
#1103281

When setting up email notifications on child posts to be sent to the parent post author, I have a hook in my functions files and on the form the email is set to be sent to site admin with 'bcc' selected.

Has a new/different method been developed over the past year or so by any chance? The reason I ask is that a 'bcc' field means that no recipients should see any of the recipients addresses if they're in the 'bcc' field but this isn't working; whether the email is viewed by the parent post author on a mobile device or desktop, the bcc field contents are displayed. I've tested by sending an email from a hotmail account to a gmail account with a recipient in the bcc field and the recipient couldn't see that field. This is how it should be with emails generated by forms.

Please advise. Thanks.

#1103776
Screen Shot 2018-09-09 at 5.07.01 PM.png

Can you tell me more about how you are adding the bcc address(es)? What specific hook code are you referring to? I just ran a quick test with two addresses in the "Send notification to a specific address" field, like this:

email1@domain.com,bcc:email2@domain.com

The email1 address received the email with no indication that email2 received the same email.
The email2 address also received the email, and is able to see that the email was originally sent to email1.
So it seems to be behaving as expected in this simple example.

#1104323
screenshot_child form.JPG
screenshot_mobile device.png
screenshot_gmail.JPG

Hi Christian

I'm adding Site Admin email address to the 'Wordpress user' field (see image). This is the only email address on the form. I then have this hook to send the email to the parent post author :-

add_filter('cred_notification_recipients', 'ts_cred_notification_recipient_524', 10, 4);
function ts_cred_notification_recipient_524($recipients, $notification, $form_id, $post_id){
      
	//this is the form ID    
	if (524 == $form_id){
           
        $parent_post_id = toolset_get_related_post($post_id, 'garden-plant' );
        $post_email = get_post_meta($parent_post_id, 'wpcf-garden-owner-email', true);
            
        $recipients[] = array('to'=>'to', 'name'=>'', 'lastname'=>'', 'address'=>$post_email );
    }
    return $recipients;
}

I've tried it again just now on a new install and it doesn't matter which field I put the bcc email address in on the form, the parent post author can see the bcc address on my mobile device and in gmail (see images). The bcc email isn't displayed in hotmail.

I have some concerns about this for my actual site because it looks like I'm spying on my users!! I had sort of concluded this isn't a Toolset issue given the different display in hotmail but I'm puzzled that you can't replicate this.

I have a back-up plan that will make this a little less like spying but it's not ideal or I could use cc instead although from the User's point of view, they may wonder why a copy is being sent to the Site Admin address and that doesn't do much for trust levels.

Is there any other way of emailing a notification to the parent post author from the child post to get round this?

#1104720

The bcc email isn't displayed in hotmail.
You use an SMTP plugin, right? In the example you're showing above, are the email "from" account and the post author's email account linked in Google in any way? What about in the SMTP configurations, is the post author account linked to any accounts used in your SMTP plugin settings? It should not be possible to see a BCC address, unless you are also the sender of the email. It may also be possible if the recipient and sender accounts are linked somehow in Google, but I'm not completely certain.

#1105299

Well I never - that's exactly why the bcc field is showing! Thank you so much for making the connection 🙂