sendinblue / APIv3-nodejs-library

SendinBlue's API v3 Node.js Library
ISC License
101 stars 47 forks source link

Enhancement request - batch sendTransacEmail with specific params #105

Open hadrien-f opened 3 years ago

hadrien-f commented 3 years ago

Hello,

We can send transactional email to an array of recipient now. This is really useful to send notification after an event for example.

However I need to provide each recipient a dedicated unsubscribe link. A generic unsubscribe button would unsubscribe then from notification from other event.

To do this I would like to add a param for each target like : "to":[ { "email":"jane@example.com", "name":"Jane Doe", "params": { "unsubscribe": "http://my.domain/api/notification/customTokenForJane", } ], edited from :

Maybe I missed something but such a feature would be useful in my case. Thanks

shubhamUpadhyayInBlue commented 3 years ago

Hi @hadrien-f I will check and let you know.

Thanks

shubhamUpadhyayInBlue commented 3 years ago

Hi @hadrien-f

I see that you are using a unique unsubscribe URL for each message version. Why is your code not working?

Just a wild guess but are you expecting that by passing the unsubscribe URL in params it will override the value of default unsubscribe link at the bottom of the email?

Please help me understand the problem so that I can help you better.

Thanks

hadrien-f commented 3 years ago

Hi, late reply sorry

The code is just a sample of a feature I would need. As I understand now we can't add params to batch transactional email request.

I would need specific params inside the transactional email but does not have to overwrite the unsubscribe link necessarily.

Thank you