Author |
|
hmuscroft Groupie
Joined: 29 December 2009 Location: United Kingdom
Online Status: Offline Posts: 72
|
Posted: 16 November 2016 at 4:31am | IP Logged
|
|
|
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 |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6103
|
Posted: 16 November 2016 at 5:00am | IP Logged
|
|
|
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 |
|
|
hmuscroft Groupie
Joined: 29 December 2009 Location: United Kingdom
Online Status: Offline Posts: 72
|
Posted: 16 November 2016 at 7:36am | IP Logged
|
|
|
Excellent - thanks again for your help and excellent support.
|
Back to Top |
|
|
hmuscroft Groupie
Joined: 29 December 2009 Location: United Kingdom
Online Status: Offline Posts: 72
|
Posted: 16 November 2016 at 7:42am | IP Logged
|
|
|
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 |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 16 November 2016 at 7:55am | IP Logged
|
|
|
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 |
|
|