Subject mail error


Hi, I’m using your API for Visual Studio (c# Language) and I have this problem: during reading, for a set of mails the “subject” property appears as “{number}”; for the other mails the subject is ok… how can I solve?



I have observed your comments and have not been able to completely understand your requirements. Can you please share a working sample project along with source files and what information you want to extract using Aspose.Email for .NET API. I also suggest you to please first try using Aspose.Email for .NET 19.9.


I’m using Aspose.Email in the versione 19.9! Downloaded by Nuget… I need to read the subject of the messages of a PEC mailbox to check if these mails must be saved into a documental repository but, for a kind of these messages, the subject is incorrect. For example: if the subject is “ACCETTAZIONE: Pratica num 2019_2258_1_1_12539 - Sinistro ATM 2019-2258 mercoledì 9 ottobre 2019 - 12:05”, when I read the property by c# code the result is “{70}”. Here is my code:

using (Imap imap = new Imap())
imap.SSLConfiguration.EnabledSslProtocols = SslProtocols.Tls12;

            imap.Connect("imap.xxxx", 993, true);    // use ConnectSSL for SSL 
            imap.UseBestLogin("", "xxxx");
            List<long> uids = imap.Search(Flag.All);
            foreach (long uid in uids)
                var eml = imap.GetMessageByUID(uid);

                IMail email = new MailBuilder()
                email.Save(@"xxxxx" + uid + ".eml");
                Console.WriteLine(uid + " - " + email.Subject);

Thanks, have a nice day!



Can you please share source file so that we may further investigate to help you out.


Ok, in the attachment there is my VS solution… thank you so much!TestPEC - (5.7 MB)



I have worked with sample project shared by you. The project does not have any source eml file which is creating problem for you. Can you please share source eml file so that we may further investigate to help you out.


Here an eml into a zipped file which is creating problem (the value of “subject” property is “{70}”) (6.9 KB)




I have worked with the sample file shared. An issue with ID EMAILNET-39609 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.



We have investigated issue on our end. This is not a bug of Aspose.Email. In the solution shared you have used reference on Mail.dll. I suggest you to please contact respective support team for your kind reference in this regard.