Date of items created with CDOEX
Exchange Server Forum Index Exchange Server
Discussion forums for Microsoft Exchange Server users.
Microsoft Outlook
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web ExchangeServerHelp.com
Date of items created with CDOEX

 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development
Author Message
Eugene Gershnik
Guest





Posted: Thu Sep 01, 2005 8:58 am    Post subject: Date of items created with CDOEX Reply with quote

I am trying to populate a public folder with some messages. The JScript code
is as follows

var msg = new ActiveXObject("CDO.Message");
msg.Fields(cdoDate) = some_date.getVarDate();
msg.Fields(cdoReceived) = some_date.getVarDate();
msg.Fields.Update();

msg.Subject = some_title;
msg.From = some_name;
msg.HTMLBody = some_text;

msg.DataSource.SaveToContainer(folder_url,
con, //a connection created earlier
adModeReadWrite,
adCreateNonCollection | adCreateOverwrite,
adOpenSource,
"", "");

Everything works [almost] fine. The message is added, the title, from field
and content are ok and I can see the correct Date and Received headers when
looking in Outlook's Right-click+Options. However, the Received date that
Outlook actually shows in the folder view as well as in item's properties is
the current one. Is there any way to set the date I want?


--
Eugene
http://www.gershnik.com

Back to top
Tom Rizzo [MSFT]
Guest





Posted: Sun Sep 11, 2005 12:58 am    Post subject: Re: Date of items created with CDOEX Reply with quote

The server will want to put its own timestamp rather than yours for security
reasons.

Tom

--
Looking for a good book on programming Exchange, Outlook, ADSI and
SharePoint? Check out http://www.microsoft.com/MSPress/books/5517.asp


"Eugene Gershnik" <gershnik@hotmail.com> wrote in message
news:%238ue5KsrFHA.2272@TK2MSFTNGP11.phx.gbl...
Quote:
I am trying to populate a public folder with some messages. The JScript
code is as follows

var msg = new ActiveXObject("CDO.Message");
msg.Fields(cdoDate) = some_date.getVarDate();
msg.Fields(cdoReceived) = some_date.getVarDate();
msg.Fields.Update();

msg.Subject = some_title;
msg.From = some_name;
msg.HTMLBody = some_text;

msg.DataSource.SaveToContainer(folder_url,
con, //a connection created earlier
adModeReadWrite,
adCreateNonCollection | adCreateOverwrite,
adOpenSource,
"", "");

Everything works [almost] fine. The message is added, the title, from
field and content are ok and I can see the correct Date and Received
headers when looking in Outlook's Right-click+Options. However, the
Received date that Outlook actually shows in the folder view as well as in
item's properties is the current one. Is there any way to set the date I
want?


--
Eugene
http://www.gershnik.com

Back to top
 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server Dedicated Servers
Contact Us
New Topics Powered by phpBB