+1 vote

Howdy,

We have finally finished our mail monitoring application after about 18 months of Dev and have started rolling it out to a few beta sites. Your Mail.dll has been great.

Our little windows service monitors two mail boxes, a MailIn and a MailOut for each company, ie all mail in and out of a business. We have transport rules that copy all mail into these inboxes in Exchange.

We are using IMAP to access exchange. Everything works perfectly except one tiny thing. When the emails come into the MailIn and MailOut mail boxes they are unread. We have set these 2 mail boxes to never send Read Receipts. both in the OWA and via the exchange console, but as soon as we delete an email we don't want to archive, it sends out a Your email was deleted without being read message.

Now, I appreciate this is not an issue with your Mail.dll but I'm having trouble finding a work around. We currently read the header of the email to determine if the email is from a CRM contact, if it is and it's allowed to be archived we download the entire message. If it's not we delete it. The way I see it is we need to either download the full message so it's flagged as seen or we add some sort of transport rule to strip the header of the read receipt. I just thought I would reach out to you and ask what you thought before I waste anymore time on it. I looked on the support forums but had no luck finding anything like this

Thanks in advance

by

1 Answer

0 votes
 
Best answer

For sure Mail.dll is not sending those read receipts. It looks like your IMAP server is doing that, and if you disabled this feature it looks like a bug.

You can easily mark email message as seen before deletion with
Imap.MarkMessageSeenByUID. There is no need to download the message to accomplish that:

using(Imap imap = new Imap())
{
    imap.Connect("imap.example.com");    // or ConnectSSL for SSL
    imap.UseBestLogin("user", "password");

    imap.SelectInbox();

    List<long> uids = client.Search(Flag.Unseen);

    if (uids.Count > 0)
        client.MarkMessageSeenByUID(uids[0]);
    imap.Close();
}
by (297k points)
...