Get CCO from C#email

Asked

Viewed 34 times

0

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

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, it is possible to get this?

1 answer

0


Browser other questions tagged

You are not signed in. Login or sign up in order to post.