This question is locked. New answers and comments are not allowed.
is it possible to send an email to multiple recipients without disclosing the email addresses to everyone?
currently when sending an email via cloudcode to multiple recipients anyone that receives the email also gets the address of anyone else.
if this is not possible what would be the best way to send a group of users an email? iterating the group and calling sendEmailFromTemplate for each user individually?
4 Answers, 1 is accepted
0
Accepted
Hi Max,
I'd suggest the following approach:
When sending the template use null for the recipients parameter:
The email will be sent to the mails in the Bcc.
Let me know if this works for you.
Regards,
Anton Dobrev
Telerik
I'd suggest the following approach:
- Create a placeholder in the template like {{BccRecipients}} and place it in the Bcc field of the template.
- Create a context when sending the template:
varcontext = {templatePlaceholder1:"value",BccRecipients: ['user1@example.com','user3@example.com'] //either an array or a string with a single email
};
When sending the template use null for the recipients parameter:
Everlive.Email.sendEmailFromTemplate( templateName, null, context, function(err, result) {...The email will be sent to the mails in the Bcc.
Let me know if this works for you.
Regards,
Anton Dobrev
Telerik
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
0
Max
Top achievements
Rank 1
answered on 20 May 2015, 04:32 PM
great trick, works as intended :)
0
Viktor
Top achievements
Rank 1
answered on 26 Sep 2017, 01:51 PM
Is this the same as defining Bcc in the Email template?
0
@Viktor
As specified here the Bcc field is described when creating a template programmatically to have hardcoded list of Bcc recipients for this template.
In the example I shared, one can use a placeholder to populate dynamically the BCC recipients for each email message sent with using this template.
Technically, I think we speak of two different usages for the Bcc here.
Regards,
Anton Dobrev
Progress Telerik
As specified here the Bcc field is described when creating a template programmatically to have hardcoded list of Bcc recipients for this template.
In the example I shared, one can use a placeholder to populate dynamically the BCC recipients for each email message sent with using this template.
Technically, I think we speak of two different usages for the Bcc here.
Regards,
Anton Dobrev
Progress Telerik
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.