You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I do not populate the (per-merge) CC field in the Metadata sheet, but do use (per-email) CC in my merge sheet, then I will end up with a CC value something like undefined, <[email protected]> and when I call MailApp.sendEmail it will throw an invalid email error.
The problem appears to be on line 211: const cachedCC = msgOptionsHash['cc']; - this is undefined in the case that CC in the metadata sheet wasn't populated. msgOptionsHas will only have a cc attribute at all if it is set, on line 154:if (cc != "") { msgOptionsHash['cc'] = cc; }, if the CC field is populated in the metadata sheet.
So when that undefined cc value gets cached at 211 it gets cached as undefined, and restored as such at 238, then the per-email cc gets appended to that undefined.
The text was updated successfully, but these errors were encountered:
If I do not populate the (per-merge) CC field in the Metadata sheet, but do use (per-email) CC in my merge sheet, then I will end up with a CC value something like
undefined, <[email protected]>
and when I call MailApp.sendEmail it will throw an invalid email error.The problem appears to be on line 211:
const cachedCC = msgOptionsHash['cc'];
- this is undefined in the case that CC in the metadata sheet wasn't populated. msgOptionsHas will only have a cc attribute at all if it is set, on line 154:if (cc != "") { msgOptionsHash['cc'] = cc; }
, if the CC field is populated in the metadata sheet.So when that undefined cc value gets cached at 211 it gets cached as undefined, and restored as such at 238, then the per-email cc gets appended to that undefined.
The text was updated successfully, but these errors were encountered: