Get E-mail CCO C #

0

I have a system that checks emails, and I have the following code where it looks for the recipient or the "with copy" field:

if (client.GetMessage(i).Headers.To != null)
{
    var msgTemp = client.GetMessage(i).Headers.To.FirstOrDefault(x => x.Address.Contains("exemplo"));
    emailDestinatario = msgTemp != null ? msgTemp.Address.ToString() : "";
    if (string.IsNullOrEmpty(emailDestinatario))
    {
        msgTemp = client.GetMessage(i).Headers.Cc.FirstOrDefault(x => x.Address.Contains("exemplo"));
        emailDestinatario = msgTemp != null ? msgTemp.Address.ToString() : "";
    }
}

However, I need to get the CCO, can I get this?

    
asked by anonymous 07.02.2018 / 18:38

1 answer

0

Hello,

Check the email has the BCC (Hidden Copy) property.

 var listaCCO = client.GetMessage(i).Headers.BCC;

Source: link

    
16.02.2018 / 13:12