Quantcast
Channel: Aspose.Email Product Family
Viewing all articles
Browse latest Browse all 1367

FetchMessage Aspose.Email.AsposeArgumentException "Wrong unique identifier"

$
0
0
Hi, 

I am getting "Aspose.Email.AsposeArgumentException" with error mesage "Wrong unique identifier" while trying to fetch message with its UniqueId. In the code below, call to Pop3Client.FetchMessage method raises the error.


using Aspose.Email;
using Aspose.Email.Mail;
using Aspose.Email.Pop3;
using System;
using System.Linq;

namespace pop
{
    class Program
    {
        static Pop3Client pop = new Pop3Client("pop.gmail.com", 995, "user@gmail.com", "password", SecurityOptions.Auto);
        static void Main(string[] args)
        {
            string id = pop.ListMessages(true).First().UniqueId;
            Console.WriteLine(id);
            MailMessage msg = pop.FetchMessage(id);
            Console.Write(msg);
            Console.ReadKey();
        }
    }
}


Best regards

Viewing all articles
Browse latest Browse all 1367

Trending Articles