Hi luperxe,
once you download the message using MessageFetchMode.Attachments, there is no need to download each attachment separately again. Try to change your code as following:
Pavel
once you download the message using MessageFetchMode.Attachments, there is no need to download each attachment separately again. Try to change your code as following:
if (mensaje.From.Address.Equals("mymail@gmail.com") && mensaje.Attachments[0].ContentType.MediaType.Equals("application/pdf"))
{
listaMensajes.Add(mensaje);
//mensaje.Seen = true;
mensaje.Attachments[0].Download();
string nombreFichero = mensaje.Attachments[0].FileName;
byte[] fichero = mensaje.Attachments[0].FileData;
}
Greets,Pavel