• Subject: Copy retained in Sent Items
  • Author: theMorse@gmail.com
  • Date: 12 Jun
  • References:
I am writing some vbscript using CDO 1.21 to send an email and a copy
is always retained in the 'Sent Items' folder of the mailbox that I am
logging into. I have looked online and some people say that you have
to set the PR_DELETE_AFTER_SUBMIT to true and then delete the
PR_SENTMAIL_ENTRYID. I have had no luck. I can't seem to access the
PR_SENTMAIL_ENTRYID and when I add the PR_DELETE_AFTER_SUBMIT it seems
to do nothing. Anyone have any ideas? Thanks in advance for taking
the time to read this.

set objApp = CreateObject("MAPI.Session")
objApp.Logon "", "", False, True, 0, True, strProfileInfo

Set objOutbox = objApp.Outbox
Set objMsg = objOutbox.Messages.Add
Set R = objMsg.Recipients.Add
with R
.Name = BLAH@BLAH.com
.Type = 1
.Resolve
End With

'Failed attempts:
'strENTRYID = objApp.GetDefaultFolder(4).ID
'objMsg.Fields.Add &H0E0A0102, strENTRYID
'objMsg.Fields.Add &H0E01000B, TRUE
'objMsg.Update


objMsg.Send
12 JunCopy retained in Sent Items.theMorse@gmail.com
12 Jun\ Re: Copy retained in Sent Items.Ken Slovak - [MVP - O...
12 Jun   \ Re: Copy retained in Sent Items.theMorse@gmail.com
12 Jun      \ Re: Copy retained in Sent Items.Ken Slovak - [MVP - O...
All times are in (US) Eastern Daylight Time (GMT -4:00)