Sending Email Through Firebase Cloud Functions
I have a big query table containing email of the users and i want to send them a newsletter email ( around 500 rows in table) When the function runs it only sends email to 30-35 us
Solution 1:
If you store your emails like this:
var someVar = ['someemail@mail.com', 'another@mail.com'];
You can do something like this:
var someVar = ['client@mail.com', 'another@mail.com'];
var sendTo = someVar.join(',');
var mailOptions = {
from: 'truironusa@gmail.com', // sender address
to: sendTo, // list of receivers
subject: 'My newsletter', // Subject line
html: '<b>content</b>', // html body// plain: 'Some text' // plain text
};
Post a Comment for "Sending Email Through Firebase Cloud Functions"