We are trying to implement an email flow where we need to check if a specific email domain has been included in the email recipients.
We are doing this quite simply by converting the TO, CC and BCC fields to lowercase strings and performing a compare and looking for our known specific domain.
What we have found is that this works perfectly for the TO and CC fields.
However it does NOT work for the BCC field.
We have used the auto-reply functionality to send back the contents of these fields after our string conversion and that shows us that the TO and CC fields convert correctly, however the BCC field is always an empty string.
Given our logic is identical on all 3 fields - We are looking for an explanation as to whether this is expected behavior or not.
We appreciate that the email.message.to/cc/bcc are collections of type email address, however I would have expected the string conversation to be consistent and either succeed or fail on all 3.
Thanks