Results 1 to 2 of 2

Thread: [RESOLVED] Redemption safemailitem problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2007
    Posts
    4

    Resolved [RESOLVED] Redemption safemailitem problem

    I have been successfully using Redemption to bypass the Outlook Security Warnings for some time now, until I recently decided to capture the body of a mailitem and save it elsewhere.

    Direct access of the mailitem.body property, draws the Outlook Security Warning so I turned to Redemption but am coming up empty.

    The example below sets the Redemption safemailitem.body value then tries to read it back. I get nothing back. If I try to read it from the mailitem.body, I do get it back...along with the dreaded Warning Message.

    Seems simple enough, so I obviously am overlooking something. Can anyone help me through this one?

    Thanks in advance.

    freedbill

    Example:
    Dim oMailItem As Outlook.MailItem
    Dim oNameSpace As Outlook.NameSpace
    Dim oFolder As Outlook.MAPIFolder
    Dim oSafeInspector As Object
    Dim oSafeMailItem As Object



    Set mvarOutlook = CreateObject("Outlook.Application")
    Set oNameSpace = mvarOutlook.GetNamespace("MAPI")
    oNameSpace.Logon "Standard"
    Set oFolder = oNameSpace.GetDefaultFolder(olFolderOutbox)
    Set oMailItem = oFolder.Items.Add
    Set oSafeMailItem = CreateObject("redemption.safemailitem")
    Set oSafeMailItem.Item = oMailItem
    oSafeMailItem.To = "[email protected]"
    oSafeMailItem.Subject = "Testing Redemption"
    oSafeMailItem.Body = "Body of Redemption Test"
    MsgBox oSafeMailItem.Body 'Returns nothing
    MsgBox oMailItem.Body 'Returns the body but Causes Outlook Security Warning

  2. #2

    Thread Starter
    New Member
    Join Date
    Dec 2007
    Posts
    4

    Re: Redemption safemailitem problem

    Problem just solved. I found some other information that implied that an item should be closed before assigning it to a redemption."safe" item. This assures the user that all item properties are availible through the "safe" item.
    I tried closing the mailitem and then assigning it to the Safemailitem. Thats all it took. I can now access the safemailitem.body property and get the real results.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width