K
Klemens Schmid
As a similar NG thread got stuck I'm asking this question again. The
following code returns Nothing in oSafeMsg. What I should mention is
that my provider is not Exchange. strEntryID looks like this:
00000000CC318A9B46C0DD47B79FDD8AB7E4619564422100. Adding the StoreID
or not doesn't matter.
The reason why I'm doing all this is that I want to create a new entry
in my Inbox looking just as if it has been sent by somebody else.
Unfortunately Redemption doesn't allow me to set the "Sent" flag on a
MessageItem object even if the item is brand new. CDO does. On the
other hand I want to set the sender in a robust way. Therefore I need
to create and assign a AddressEntry to the Sender using Redemption to
avoid the security popup.
Set oCDOSession = CreateObject("MAPI.Session")
oCDOSession.Logon showDialog:=False, newSession:=False
Set oCDOMsg = oCDOSession.Inbox.Messages.Add("Test1", "Test11",
"IPM.Note.Test1")
oCDOMsg.TimeReceived = Now
oCDOMsg.UnRead = True
oCDOMsg.Sent = True
oCDOMsg.Update
strEntryId = oCDOMsg.ID
Set oCDOMsg = Nothing
Set oSafeMsg = oMAPIUtils.GetItemFromID(strEntryId)
following code returns Nothing in oSafeMsg. What I should mention is
that my provider is not Exchange. strEntryID looks like this:
00000000CC318A9B46C0DD47B79FDD8AB7E4619564422100. Adding the StoreID
or not doesn't matter.
The reason why I'm doing all this is that I want to create a new entry
in my Inbox looking just as if it has been sent by somebody else.
Unfortunately Redemption doesn't allow me to set the "Sent" flag on a
MessageItem object even if the item is brand new. CDO does. On the
other hand I want to set the sender in a robust way. Therefore I need
to create and assign a AddressEntry to the Sender using Redemption to
avoid the security popup.
Set oCDOSession = CreateObject("MAPI.Session")
oCDOSession.Logon showDialog:=False, newSession:=False
Set oCDOMsg = oCDOSession.Inbox.Messages.Add("Test1", "Test11",
"IPM.Note.Test1")
oCDOMsg.TimeReceived = Now
oCDOMsg.UnRead = True
oCDOMsg.Sent = True
oCDOMsg.Update
strEntryId = oCDOMsg.ID
Set oCDOMsg = Nothing
Set oSafeMsg = oMAPIUtils.GetItemFromID(strEntryId)