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
The issue is that the types here for to, cc, and bcc are incorrect. They should be AddressObject | undefined.
AddressObject[] type is is what is giving you the type error, because it is an array of AddressObjects. To satisfy typescript, you have to handle both the case where to could be AddressObject[] or the case where to could be AddressObject, even though the former case should never occur. The relevant code for the address parsing is here and here.
Hi, how can I get the text value of an email recipient?
I did it successfuly for a sender:
but when I try to do that for "to":
const toText = email.to?.text ?? "";
I get this error:
After displaying a whole email object (
console.log(email)
) i can see that I should be able to accessto
, just asfrom
:What might be the problem here? Am I using wrong keywords?
The text was updated successfully, but these errors were encountered: