Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET IMAP

 AfterLogic Forum : MailBee.NET IMAP
Subject Topic: Get DateSent & Importance from Envelope? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
hmuscroft
Groupie
Groupie


Joined: 29 December 2009
Location: United Kingdom
Online Status: Offline
Posts: 72
Posted: 16 November 2016 at 4:31am | IP Logged Quote hmuscroft

Hi - I'm now about half way through converting my project to work with IMAP as well as POP.

My approach has been to use "DownloadEnvelopes" to get a list of available messages on the server (which are then displayed in a grid) and then calling "DownloadEntireMessage" when the user previews (or opens) an email.

However, this means that I need to retrieve basic information from the ENVELOPES to display in the grid, without downloading the entire message. I'm nearly there, but I've noticed the following differences between the two classes :-

- MailBee.ImapMail.Envelope
- MailBee.Mime.MailMessage

Firstly, I noticed that MailMessage has a '.DateSent' property which is missing from the Envelope class. Is there a way to get the "DateSent" value of an email from the Envelope please?

Secondly, MailMessage has an '.Importance' property which is also missing from the Envelope class. Is there a way to find the "Importance" setting of an email from the Envelope?

Many thanks for your kind assistance!

Regards,

Hedley
Back to Top View hmuscroft's Profile Search for other posts by hmuscroft
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6038
Posted: 16 November 2016 at 5:00am | IP Logged Quote Igor

Quote:
Firstly, I noticed that MailMessage has a '.DateSent' property which is missing from the Envelope class. Is there a way to get the "DateSent" value of an email from the Envelope please?


This property is populated from X-Date-Sent which is a non-standard one and typically it's not present in email message. MailBee sets that header when converting Outlook MSG files into EML / MailMessage structure. When possible, using .Date property instead is recommended.

Quote:
Secondly, MailMessage has an '.Importance' property which is also missing from the Envelope class. Is there a way to find the "Importance" setting of an email from the Envelope?


That's possible, but you need to explicity request that header to be supplied as a part of envelope. This DownloadEnvelopes overload can do it, check extraHeaders parameter.

Hope this helps!

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
hmuscroft
Groupie
Groupie


Joined: 29 December 2009
Location: United Kingdom
Online Status: Offline
Posts: 72
Posted: 16 November 2016 at 7:36am | IP Logged Quote hmuscroft

Excellent - thanks again for your help and excellent support.
Back to Top View hmuscroft's Profile Search for other posts by hmuscroft
 
hmuscroft
Groupie
Groupie


Joined: 29 December 2009
Location: United Kingdom
Online Status: Offline
Posts: 72
Posted: 16 November 2016 at 7:42am | IP Logged Quote hmuscroft

One quick follow up question - the MailBee "MailPriority" enumeration is as follows :-

Code:
public enum MailPriority
  {
    None = 0,
    Highest = 1,
    High = 2,
    Normal = 3,
    Low = 4,
    Lowest = 5
  }


Please can you tell me how to map to this enumeration using "X-Priority" or "X-MS-Mail-Priority"?

The example you provided only shows how to tell of a message is flagged as "Important".

Many thanks.
Back to Top View hmuscroft's Profile Search for other posts by hmuscroft
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 16 November 2016 at 7:55am | IP Logged Quote Alex

If you set MailPriority to Highest, MailBee sets "X-Priority: 1 (Highest)". MailPriority.Lowest mapped to "X-Priority: 5 (Lowest)" is the opposite setting.

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