Hey, I have a problem when trying to send emails to users.
first of all the email address isn’t an identity key. and I may have two or more users using the same email, so when I want to send an email for this email, it will be sent as many as I have users using this email.
EX:
user1’s email is example@gm.com
user2’s email is example@gm.com
user3’s email is example@gm.com
if I try to send an email with a specific template to “example@gm.com”, the email will be received three times.
Code for sending email:
var templateName = "example";
var emailEnvelope = new Backendless.Messaging.EmailEnvelope();
emailEnvelope.setTo([user.email]);
await Backendless.Messaging.sendEmailFromTemplate(templateName, emailEnvelope);
var templateName = "example";
var emailEnvelope = new Backendless.Messaging.EmailEnvelope();
emailEnvelope.setTo(["example@gm.com"]);
await Backendless.Messaging.sendEmailFromTemplate(templateName, emailEnvelope);
example@gm.com will receive 3 emails, completely the same emails but three times.
is it clear now ?