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?