Hello
Refer to the IMAP activity log, Aspose using following pattern when fetch messages:
e.g.
AE_2_1_0020 UID FETCH 4156 (RFC822)
where 4156 is one of the message id.
But we met a older environment which cannot compatible with “RFC822” words. the server will return wrong response if fetch messages with “RFC822”
And we do some testing, if the command is
UID FETCH 4156 (BODY[])
which use “BODY[]”, the server will return correct response.
The issue is that the server is too old and cannot handle RFC822, but it’s hard to do an update to the server.
Is there any method or properties we can using and then we can fetch message with “BODY[]” rather than “RFC822”?
Thanks in advance,
@xieming95at163.com
Could you please share complete detail of your working environment along with sample code example to reproduce the same issue at our end? We will investigate the issue and provide you information on it.
Hello,
I’m using Aspose.Email in C#.
the method i’m using is
> var AsposeImapClient = new Aspose.Email.Clients.Imap.ImapClient(this.IMAPAddress, this.IMAPPort, this.UserName, this.Password, Aspose.Email.Clients.SecurityOptions.SSLAuto);
AsposeImapClient.ReadOnly = true;
AsposeImapClient.Timeout = DownloadTimeOut * 60 * 1000;
var messages = AsposeImapClient.ListMessages(“INBOX”);
…
//There is a message which id is “1”
…
var message = AsposeImapClient.FetchMessage(“1”);
Is there any parameter or option I can use when FetchMessages to make that the inner request command is like UID FETCH 4156 (BODY[])
because the server I’m working on cannot handle “RFC822”?
Thanks,
Ming.
@xieming95at163.com
We have logged a ticket for your requirement in our issue tracking system as EMAILNET-40710. We will inform you via this forum thread once there is an update available on it.
We apologize for your inconvenience.
Hello,
I saw the linked issue is closed. It means the issue has been fixed in release, right? But I’m not able to find any documents about the fix, e.g., how to use (BODY[]) rather than (RFC822) when using FetchMessage? Could you give any guide for this? Sorry I did not find any related parameters in any override in method FetchMessage in new version of Aspose.Email.
Thanks,
Hello @xieming95at163.com,
We added the SupportOldServer property to ImapClient.
Use it as follows to use (BODY[]) when fetching emails:
client.SupportOldServer = true;
Hi,
Got it. Thanks for your help.
@xieming95at163.com,
You’re welcome!
If you have any further questions please feel free to ask.