Pass json to ZDK.Client.openMailer TO parameter
Hello
I try to make send emails to a list of emails with :
- ZDK.Client.openMailer({ from: 'example@zoho.com', to: details_output, subject: 'test Mailing List', body: 'Test Mailing List Body' });
where details_output is an array like :
- [{ "email": "testcarte18078@test.com", "label": "Test Contact#4 (DL)" }, { "email": "testcarte18076@test.com", "label": "Test Contact#3 (DL)" }, { "email": "testcarte18074@test.com", "label": "Test Contact#2 (DL)" }, { "email": "testcarte18072@test.com", "label": "Test Contact#1 (DL)" }]
but it doesn't work when I pass the array to ZDK.Client.openMailer
if I write like (list of emails hard coded) :
- ZDK.Client.openMailer({ from: 'example@zoho.com', to: [{ "email": "testcarte18078@test.com", "label": "Test Contact#4 (DL)" }, { "email": "testcarte18076@test.com", "label": "Test Contact#3 (DL)" }, { "email": "testcarte18074@test.com", "label": "Test Contact#2 (DL)" }, { "email": "testcarte18072@test.com", "label": "Test Contact#1 (DL)" }], subject: 'test Mailing List', body: 'Test Mailing List Body' });
it works as expected
So how I can have same behavior when pass an array (because of dynamic emails) into "TO" parameter ?
Thanks
idea welcomed