S
Steve W
I have a VB6 add-in that uses Redemption to 'unwind' emails that have
attachments that are themselves emails.
The code works like this :
oSafeMessageMail as Redemption.MessageItem
oSafeMail as Redemption.SafeMailItem
oNewEmail as Outlook.MailItem
Open email
If it has > 1 attachment Then
For each attachment
If this is an email Then
set oSafeMessageMail = attachment.EmbeddedMsg
oSafeMail.Item = oSafeMessageMail
oNewEmail = Outlook.CreateItem(olMailItem)
oSafeMail.CopyTo oNewMail
'some code here to set oNewEmail, oSafeMailItem and
oSafeMessageMail to Nothing and then re-open the
'the email, setting oNewEmail to it - this is following the
Redemption advice to as "Outlook remembers the old values of some
properties"
move oNewEmail to a specific folder
End If
Loop
End If
This all works fine, except that a copy of the new email appears in my
Outbox and will ultimately be sent when I hit Send/Receive. I understand
that this happens because the relevant flag (the MSGFLAG_UNSENT bit in
PR_MESSAGE_FLAGS property) is effectively read-only so I cannot change it's
value and Outlook thinks this is a message to send. I can get around this
because I can find the message in my Outbox and delete it (the copy in the
other folder is fine) which obviously stops it being sent.
My question is : if the user is using Outlook with Exchange Server, will I
be able to look through my Outbox before the email is sent from it ?
Any suggestions / advice would be much appreciated,
Thanks
Steve
attachments that are themselves emails.
The code works like this :
oSafeMessageMail as Redemption.MessageItem
oSafeMail as Redemption.SafeMailItem
oNewEmail as Outlook.MailItem
Open email
If it has > 1 attachment Then
For each attachment
If this is an email Then
set oSafeMessageMail = attachment.EmbeddedMsg
oSafeMail.Item = oSafeMessageMail
oNewEmail = Outlook.CreateItem(olMailItem)
oSafeMail.CopyTo oNewMail
'some code here to set oNewEmail, oSafeMailItem and
oSafeMessageMail to Nothing and then re-open the
'the email, setting oNewEmail to it - this is following the
Redemption advice to as "Outlook remembers the old values of some
properties"
move oNewEmail to a specific folder
End If
Loop
End If
This all works fine, except that a copy of the new email appears in my
Outbox and will ultimately be sent when I hit Send/Receive. I understand
that this happens because the relevant flag (the MSGFLAG_UNSENT bit in
PR_MESSAGE_FLAGS property) is effectively read-only so I cannot change it's
value and Outlook thinks this is a message to send. I can get around this
because I can find the message in my Outbox and delete it (the copy in the
other folder is fine) which obviously stops it being sent.
My question is : if the user is using Outlook with Exchange Server, will I
be able to look through my Outbox before the email is sent from it ?
Any suggestions / advice would be much appreciated,
Thanks
Steve