locked
Unable to get sender email address via Redemtion for external emails: AccessViolationException: Attempted to read or write protected memory. RRS feed

  • Question

  • Hello guys,

    I've faced with problem, that using Redemption I can't receive sender email address of email item, which are sent from external exchange account. When I read email from internal account (from users in my company), Sender Email Address is parsed correctly.

    I have assumption, that problem is not Redemption library, as it works for my office but not for the client's environment.

    So, there is my code:

    public static void GetMailInfo(MailItem mailItem)
    {
        SafeMailItem safeMailItem =
            (SafeMailItem)
            Activator.CreateInstance(Type.GetTypeFromProgID(MSOutlookExchangeHelper.RDOCustomClasses.SafeMailItem));
    
        safeMailItem.Item = mailItem;
        AddressEntry senderAddress = safeMailItem.Sender;
    
        if (senderAddress != null)
        {
            if (senderAddress.Type == Constants.ExchangeAddressTypeFlag)
            {
                string Name = safeMailItem.SenderName;
                string Adress = safeMailItem.SenderEmailAddress;
            }
            else
            {
                string Adress = safeMailItem.SenderEmailAddress;
            }
        }
    }

    Exception is:

    System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
       at Redemption.ISafeMailItem.get_SenderEmailAddress()

    Do you have any ideas? Probably it's some problems with environment.

    Wednesday, February 18, 2015 7:36 AM

All replies

  • Hello Alexey,

    Redemption is a proprietary software. I'd suggest contacting Dmitry directly, see Contact Redemption Support .

    Are you able to reproduce the issue using the Outlook object model?

    Wednesday, February 18, 2015 7:49 AM
  • Hi Eugeny,

    no, I didn't try to reproduce issue using Outlook object model.

    I've send email to Dmitry, as you suggested. thank you for help!

    If I'll have any results, I'll comment this topic.

    Wednesday, February 18, 2015 7:58 AM
  • That will be great. Also try to reproduce the issue with the OOM.
    Wednesday, February 18, 2015 8:00 AM
  • This is usually an indication that you are using an older version of a COM library that does not implement a particular method/property – the call goes past the v-table resulting in an access violation.
    Can you try to re-register your instance of redemption.dll?

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Wednesday, February 18, 2015 5:31 PM
  • Eugene,

    I have no problem answering the question here. You know that as I well as I do.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Wednesday, February 18, 2015 5:32 PM
  • Dmitry, thank you for suggestion, but it seems, it didn't helped me. What I've done:

    1. Open command Line
    2. cd "\Program Files (x86)\My Application"
    3. regsvr32 /u redemption.dll
    4 .See a dialog box saying “DllUnregisterServer in redemption.dll succeeded.” Click OK.
    5. regsvr32 redemption.dll
    6. See a dialog box saying “DllRegisterServer in redemption.dll succeeded.” Click OK.
    7. Restart my application

    Also, I would notice that earlier version of my application used old redemption library version. So, you propose about re-registration makes sense, but as I see, it didn't helped me. But installer already register Redemption library and we don't see such problems for other clients...

    The main strange, that mails from internal accounts are resolved ok and I'm able to get sender name. I've tried to disable all Outlook plugins, but it didn't help me anyway. Problem is for external exchange.
    Thursday, February 19, 2015 7:35 AM
  • Yes, but the forum is for Outlook dev questions. Support questions should be discussed on the Redemption-specific forum instead.
    Thursday, February 19, 2015 12:28 PM
  • Redemption questions are Outlook dev questions.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Thursday, February 19, 2015 1:58 PM
  • I will send a debug version of Redemption to your private email address.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Thursday, February 19, 2015 1:58 PM
  • I don't think so.

    There are Outlook programming questions and third-party commercial software related to Outlook dev. The forum is for the first one.

    Other proprietary software - such as Aspose, Add-in Express, Redemption and etc. should be discussed outside of the forum. All these components can be used in Outlook development.

    Thursday, February 19, 2015 2:06 PM
  • That would be up to a moderator to decide.

    Ken Slovak MVP - Outlook

    Wednesday, February 25, 2015 9:17 PM
  • Very interesting to see how Microsoft provides technical support for the third-party commercial software.
    Wednesday, February 25, 2015 9:49 PM
  • MS isn't providing the support, and you're free to not answer questions about Redemption.

    Ken Slovak MVP - Outlook

    Thursday, February 26, 2015 2:19 PM
  • Exactly. Nobody can provide qualified technical support except the vendor. That's why I always recommend contacting the owner/vendor/developer directly.
    Thursday, February 26, 2015 2:38 PM
  • Guys, of course you can delete this thread as off-topic. But if I'll have solution I'll provide here and probably it will help other developers in future.
    Thursday, February 26, 2015 2:45 PM
  • Please do post your solution if you have one, it could help others.

    Ken Slovak MVP - Outlook

    Thursday, February 26, 2015 3:14 PM