Sent redemption message not added to Sent Items folder

  • Thread starter Thread starter Jack
  • Start date Start date
J

Jack

I am using redemption to send an email message. Everything works fine
except I can never get a copy of the message in my sent items folder.
I have added a sample of my code below.

Set objSession = CreateObject("MAPI.Session")
Set objMessage = objSession.Outbox.Messages.Add
objMessage.Fields(ActMsgPR_DELETE_AFTER_SUBMIT) = True
objMessage.Subject = sSubject
objMessage.Text = sText

Set objSafeMessage = CreateObject("Redemption.SafeMailItem")
objSafeMessage.Item = objMessage

Set objSafeRecipient = objSafeMessage.Recipients.Add(sRecip)
objSafeRecipient.Type = mapiTo
objSafeRecipient.Resolve

objSafeMessage.Send
objSession.DeliverNow
 
Try setting the PR_SENT_MAIL_ENTRYID MAPI property to the entry id of the
Sent Items folder:

objSafeMessage.Fields(PR_SENT_MAIL­_ENTRYID) =
objSession.GetDefaultFolder(Cd­oDefaultFolderSentItems).Entry­ID
 
Back
Top