Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET IMAP

 AfterLogic Forum : MailBee.NET IMAP
Subject Topic: How get UID by MessageId in Sent Folder? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Davidson1982
Newbie
Newbie
Avatar

Joined: 06 July 2017
Location: Brazil
Online Status: Offline
Posts: 2
Posted: 06 July 2017 at 12:06pm | IP Logged Quote Davidson1982

Hi,

I can't get the UID of a message by the message-ID in the sent email folder. This problem is only occurring with the emails from the "Sent" folder on Hotmail/Outlook.
I'm get all folders names and set selct folder to "Sent" and then I query by message_ID.

for exemplo:
...
imp.Connect("imap.company.com");
imp.Login("xxx@company.com", "secret");

// Select Inbox folder.
imp.SelectFolder("Sent");

uids = (UidCollection)imp.Search(true, $"HEADER \"MESSAGE-ID\" \"<6.c131ce57230d19a57960@XXX-06>\"", null);
...

Can someone tell me what I'm doing wrong?

Thanks.
Back to Top View Davidson1982's Profile Search for other posts by Davidson1982
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 06 July 2017 at 3:25pm | IP Logged Quote Alex

Hi,

Please confirm that:
- With other mail services (not Hotmail/Outlook) the problem does not occur.
- With other folders (not Sent) the problem does not occur.
- You can find the Message-IDs in question if you download headers of emails in Sent folder (i.e. you can confirm these Message-IDs are actually there in emails).

Or, if any of the above is not so, please clarify. Thanks!

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
Davidson1982
Newbie
Newbie
Avatar

Joined: 06 July 2017
Location: Brazil
Online Status: Offline
Posts: 2
Posted: 07 July 2017 at 2:21pm | IP Logged Quote Davidson1982

Hi Alex,


Answering your questions:
- This problem doesn't occur with Gmail and Yahoo;
- Apparently this problem only happens with Sent folder. I did any queries whith e-mail in others folders and I finded UID.
- To temporarily resolve the problem, I'm getting all email's headers to Sent folder and using a LINQ expression to find the UID by MessageID. In this way I'm finding the UID of the message. The problem will be when you hear many e-mails in the sent box, this process can be very slow.



When I click on the message source in the email box it shows the information below:

Received: from BLU437-SMTP84 (10.173.208.23) by
SC1P15201MB2159.LAMP152.PROD.OUTLOOK.COM (10.165.132.140) with Microsoft SMTP
Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id
15.1.1220.11 via Mailbox Transport; Thu, 6 Jul 2017 14:32:59 +0000
Received: from [192.168.25.137] ([177.135.140.25]) by BLU437-SMTP84.smtp.hotmail.com over TLS secured channel with Microsoft SMTPSVC(8.0.9200.16384);
      Thu, 6 Jul 2017 07:32:54 -0700
X-Mailer: MailBee.NET 11.0.0.569
From: yz@hotmail.com
Reply-To: yz@hotmail.com
To: davidson1982@hotmail.com
Subject: Teste - Davidson
Date: Thu, 06 Jul 2017 11:32:46 -0300
Message-ID: <6.c131ce57230d19a57960@XXX-06>
Content-Type: multipart/alternative;
     boundary="----=_NextPart_000_E941_9CA25862.517E6F77"
Return-Path: xyz@hotmail.com
X-OriginalArrivalTime: 06 Jul 2017 14:32:54.0063 (UTC) FILETIME=[C0E60BF0:01D2F664]
X-MS-Exchange-Organization-Network-Message-Id: 1c31a2da-b05f-446b-8e0a-08d4c47be72e
X-MS-Exchange-Organization-AuthSource: SC1P15201MB2159.LAMP152.PROD.OUTLOOK.COM
X-MS-Exchange-Organization-AuthAs: Anonymous
X-TMN: [2Ntl1AvRigT+9BR4SfxLGqypFdLrUlpf]
MIME-Version: 1.0

Regards,
Davidson
Back to Top View Davidson1982's Profile Search for other posts by Davidson1982
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 10 July 2017 at 4:16am | IP Logged Quote Alex

Hi Davidson,

I just tried your code with Sent folder of my Hotmail account. I got UID successfully. No problems. I can't reproduce your issue..

Code:

UidCollection uids = (UidCollection)imp.Search(true, string.Format("HEADER \"MESSAGE-ID\" \"<BLU436-SMTP164530C6A7E1D66F0D83CA7C6A50@phx.gbl>\""), null);


I tried several mails (and diff. Message-IDs). They all have been successfully located by Search. I'm using MailBee.NET Objects v11.1.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide