Closed RobStallion closed 6 years ago
@RobStallion good question, thanks for opening this issue! 👍
Hidden in the docs (Readme) is:
https://github.com/dwyl/sendemail#more-options
Perhaps it's time for a "Table of Contents"...? 🤔
@nelsonic @roryc89 what are your thoughts on catering for passing in email
as an array of email strings:
var object = {
toName: 'name',
email: ['email1@email.com', 'email2@email.com'],
subject: 'subject',
details: 'details'
};
and also catering for passing in a single email
string:
var object = {
toName: 'name',
email: 'email1@email.com',
subject: 'subject',
details: 'details'
};
In the above example
@shouston3 / @RobStallion / @parkhabit
I'm happy with updating the sendemail.email
to accept an Array
on the object.email
,
please write the necessary tests and (if possible) maintain backward compatibility.
There are a handful of people/projects using the module: https://www.npmjs.com/package/sendemail
Sounds good @nelsonic
sendemail@3.4.0
on NPM includes @shouston3's update! 🎉 (thanks again!)
When trying to send an email to multiple email addresses at once I was getting an error.
It looks like this line is putting the
toAddresses
into an array. This works if you just pass in one email address as a string but it does not work if you have multiple email addresses that you need to send to at once.I think that the person using the module should pass in an array to
toAddresses
themselves and the wrapping should be removed from the node module. This way we would not wrap an array within an array when sending to multiple email addresses.This is an example of an object that I am currently trying to call the
sendemail.email
function withIs there another way that this function is intended to be used?