Author |
|
hmuscroft Groupie
Joined: 29 December 2009 Location: United Kingdom
Online Status: Offline Posts: 72
|
Posted: 03 February 2017 at 12:29am | IP Logged
|
|
|
I've noticed that when I call "DownloadEntireMessage" it also seems to mark the email as READ.
Is this by design in MAILBEE (in which case, is there a way of getting the message without marking as read) or is this something that the IMAP server is doing?
My app needs to be able to download and preview an email, without marking it as read.
Many thanks!
|
Back to Top |
|
|
hmuscroft Groupie
Joined: 29 December 2009 Location: United Kingdom
Online Status: Offline Posts: 72
|
Posted: 03 February 2017 at 12:31am | IP Logged
|
|
|
Ignore that - I just found the 'SetSeenForEntireMessages' property.
http://afterlogic.com/mailbee-net/docs/MailBee.ImapMail.Imap.SetSeenForEntireMessages.html
|
Back to Top |
|
|
hmuscroft Groupie
Joined: 29 December 2009 Location: United Kingdom
Online Status: Offline Posts: 72
|
Posted: 06 February 2017 at 1:48am | IP Logged
|
|
|
Further to this question, I sometimes need to get both the MailMessage object AND the Envelope too.
I was using the following :-
Code:
Envelope.env = m_imap.DownloadEnvelopes(UIDs, true, EnvelopeParts.All, -1, null, null); |
|
|
This gets both the envelope and the entire MailMessage (which is stored in the env.MessagePreview property).
The problem is that this call also marks the email as '\SEEN' on the IMAP server.
Is there a way of downloading both the envelope and the message in one call (like this) but without marking it as READ?
I can work-around this by calling "DownloadEnvelopes" to get just the flags, and then calling "DownloadEntireMessage" separately with "SetSeenForEntireMessages" as FALSE, but I was wondering if there's a better way?
Thanks.
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 06 February 2017 at 1:52am | IP Logged
|
|
|
Hello,
According to DownloadEnvelopes Method documentation page, setting message preview size to -2 will ensure message isn't marked as read:
Code:
Envelope.env = m_imap.DownloadEnvelopes(UIDs, true, EnvelopeParts.All, -2, null, null); |
|
|
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: 06 February 2017 at 3:31am | IP Logged
|
|
|
Oops - I didn't spot the magic value in the documentation - thanks for pointing it out!
|
Back to Top |
|
|