N
Novu•2y ago
sgrzelak

Sending emails

Hi, I have self hosted novu and got such a problem. I am triggering email sending with some payload and "to" body which have to contains subscriberId and email. I have discovered that subscriberId not have to be the real subscriberId but just some text, but if email is correct the email message will be send to that email. The problem is when I send few emails to different receivers but setup same subscriberId in "to" body then it sometimes happens that all emails goes to single receiver or some part of emails to one receiver and another part to second one and rest of receivers got non of them. Do you know what is the problem?
5 Replies
sgrzelak
sgrzelakOP•2y ago
Do you cache somehow subscriberId with email and if in "to" of body request is the same subscriberId then data for subscriber are from cache, so email also?
Pawan Jain
Pawan Jain•2y ago
@george.d you might have better context of this whether we cache the request combination in /trigger api?
george.d
george.d•2y ago
Hey @sgrzelak, the subscriberId should be your internal identifier of the subscriber. please make sure to not mix the data of the subscribers. i suspect that you have an issue on the updated of the subscriber entity. for example if you send to subscriberId= 123 [email protected] message, and then sent subscriberId= 123 [email protected]. the subscriber 123 will be updated with the new email [email protected]. if those two messages will be sent in the same time all the messages will be sent to the last email. because it is the most updated. (for subscriber 123)
sgrzelak
sgrzelakOP•2y ago
Yup, I have checked mongodb and records confirm what You said, thanks for answer! 🙂
Pawan Jain
Pawan Jain•2y ago
Sounds like this should be in docs I think it is already in docs http://docs.novu.co/platform/subscribers#1-ahead-of-trigger
Want results from more Discord servers?
Add your server