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
--
Eric Legault - B.A, MCP, MCSD, Outlook MVP
--------------------------------------------------
{Private e-mails ignored}
Job:
http://www.imaginets.com
Blog:
http://blogs.officezealot.com/legault/
"Jack" wrote:
> 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
>