Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET IMAP

 AfterLogic Forum : MailBee.NET IMAP
Subject Topic: "UploadMessage" INTERNALDATE parameter 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: 26 January 2017 at 5:06am | IP Logged Quote hmuscroft

So there are numerous occasions when I am using "UploadMessage", for example :-

- Uploading a DRAFT to the DRAFTS folder
- Uploading an email to the SENT ITEMS folder when it's just been sent

In these cases, I call the variant of "UploadMessage" without the datetime parameter and the server just assigns the current date which is fine.

However, my program also allows users to move an email from a FOLDER in one IMAP account to a completely different folder another IMAP account.

This necessitates a "DeleteMessage" on the 'source' IMAP server and "UploadMessage" on the 'destination' server.

The problem here is that the datetime gets reset and it looks like a completely new email has arrived - even if it was years old.

Adding to the complication, a user could move an email from the INBOX on one IMAP server to the SENT ITEMS on another server.

Looking at the "MailMessage" which is the actual object being moved, there are three datetime properties :-
- Date
- DateReceived
- DateSent

So when calling "UploadMessage()" to move an email between IMAP accounts, do you have any advice as to which datetime parameter to use?

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: 2159
Posted: 26 January 2017 at 5:21am | IP Logged Quote Alex

Usually you have Envelope for the source message. And you should use Envelope.DateReceived because it's taken from INTERNALDATE. When using UploadMessage, it actually assigns INTERNALDATE. So if you get the same value from the source message, you're good.

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


Joined: 29 December 2009
Location: United Kingdom
Online Status: Offline
Posts: 72
Posted: 26 January 2017 at 5:29am | IP Logged Quote hmuscroft

OK - "DateReceived" it is then - many thanks!
Back to Top View hmuscroft's Profile Search for other posts by hmuscroft
 

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