Author |
|
hmuscroft Groupie
Joined: 29 December 2009 Location: United Kingdom
Online Status: Offline Posts: 72
|
Posted: 26 January 2017 at 5:06am | IP Logged
|
|
|
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 |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 26 January 2017 at 5:21am | IP Logged
|
|
|
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 |
|
|
hmuscroft Groupie
Joined: 29 December 2009 Location: United Kingdom
Online Status: Offline Posts: 72
|
Posted: 26 January 2017 at 5:29am | IP Logged
|
|
|
OK - "DateReceived" it is then - many thanks!
|
Back to Top |
|
|