Hi all i have set the variable in environment file like as below
REACT_APP_RECIPIENT_MAIL="[email protected],[email protected],[email protected]"
and then i am retrieving those like as below
let toArr;
if (isDevelopmentMode()) {
const mailList = process.env.REACT_APP_RECIPIENT_MAIL;
console.log(mailList);
toArr = mailList.split(',');
} else {
toArr = Array.isArray(to) ? to : [to];
}
const toAddrs = toArr.map(toAddr => ({
emailAddress: {
address: toAddr
}
}));
getting undefined at this line console.log(mailList); for mailList and i am not sure where i am doing wrong with the above code, Could any one please suggest any ideas on this?
Many thanks in advance.
npm start