Resolved email CC error IO-618

This commit is contained in:
Patrick Fic
2021-02-02 21:31:48 -08:00
parent 2ddaad3e2b
commit b1a2134dd3
3 changed files with 13 additions and 8 deletions

View File

@@ -31,10 +31,16 @@ exports.sendEmail = async (req, res) => {
Email: req.body.from.address,
Name: req.body.from.name,
},
To: req.body.to.map((i) => {
return { Email: i };
}),
To:
req.body.to &&
req.body.to.map((i) => {
return { Email: i };
}),
CC:
req.body.cc &&
req.body.cc.map((i) => {
return { Email: i };
}),
ReplyTo: {
Email: req.body.from.address,
Name: req.body.from.name,