Solved

Send email using VB .net using RDO with Redemption.dll

Posted on 2007-03-21
10
5,842 Views
Last Modified: 2008-01-09
I am using the following VB .NET code to create an email with voting options. I am using the Redemption.dll so that I can bypass the security prompt. The code had worked at one point but now I'm getting the error noted below. I had set up another profile on outlook so that I could logon as a different user. This may have caused the error, not sure.

References to:
Outlook
Redemption

Private Sub TESTRDO()

        Dim Session As Redemption.RDOSession
        Dim Mail As Redemption.RDOMail
        Session = CreateObject("Redemption.RDOSession")
        Session.Logon()

        Mail = Session.GetDefaultFolder(Redemption.rdoDefaultFolders.olFolderInbox)
        Mail.Recipients.Add("eaters@lunch.com")
        Mail.Subject = "Lunch anybody?"
        Mail.Body = "Please open the message and click on one of the buttons"
        ''to indicate your lunch preference"
        Mail.VotingOptions = "Chinese;Italian;Mexican;Don't care"
        Mail.Send()

    End Sub



I get the following error message on this line of code:
        Mail = Session.GetDefaultFolder(Redemption.rdoDefaultFolders.olFolderInbox)

Error message :

An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in CreateTSEmail.exe

Additional information: Error in IMAPISession::OpenMsgStore: 0x8004011D
Error: The information store could not be opened.
Component: MAPI 1.0

Thanks in advance for any help here.
0
Comment
Question by:bboo
  • 5
  • 3
10 Comments
 
LVL 21

Expert Comment

by:theGhost_k8
ID: 18769437
afaik ur session has some problem i think.
0
 
LVL 21

Expert Comment

by:theGhost_k8
ID: 18769461
       Dim Mail As Redemption.RDOMail
        Mail = Session.GetDefaultFolder(Redemption.rdoDefaultFolders.olFolderInbox)
How can u assign GetDefaultFolder(...) to Mail...??
0
 
LVL 21

Expert Comment

by:theGhost_k8
ID: 18769470
GetDefaultFolder(FolderType)
FolderType - integer. The type of default folder to return. Accepts the same values as Namespace.GetDefaultFolder method in Outlook Object Model (olFolderInbox, olFolderContacts, etc).

It Returns RDOFolder object.
and you are assigning it to RDOMail object. WRONG !!!

read more:-
      http://www.dimastr.com/redemption/rdo/rdosession.htm#methods
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 

Author Comment

by:bboo
ID: 18770651
The solution you suggested still gave me the same error:
This is the exact same code as found on:
 http://www.dimastr.com/redemption/rdo/rdosession.htm#methods


Dim Session As Redemption.RDOSession
        Dim Mail As Redemption.RDOMail
        Dim Inbox As Redemption.RDOFolder
        Session = CreateObject("Redemption.RDOSession")
        Session.Logon()

' The code gives error on the line below
        Inbox = Session.GetDefaultFolder(Redemption.rdoDefaultFolders.olFolderInbox)
        Mail.Recipients.Add("eaters@lunch.com")
        Mail.Subject = "Lunch anybody?"
        Mail.Body = "Please open the message and click on one of the buttons"
        Mail.VotingOptions = "Chinese;Italian;Mexican;Don't care"
        Mail.Send()
0
 
LVL 21

Expert Comment

by:theGhost_k8
ID: 18770745
CreateTSEmail.exe  ??? is it ur application name?
show whole message.. line number..
try catching exception of type COMException.
ultimate help is this:
dmitry@dimastr.com
0
 

Author Comment

by:bboo
ID: 18771605
CreateTSEmail.exe is the application name.
 This is the same message I sent above.

An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in CreateTSEmail.exe

Additional information: Error in IMAPISession::OpenMsgStore: 0x8004011D
Error: The information store could not be opened.
Component: MAPI 1.0
0
 

Accepted Solution

by:
bboo earned 0 total points
ID: 18773272
Actually I fixed the problem myself and need no further support.
I was able to contact my Outlook admistrator and he needed to reinstall Outlook on my machine since I had corrupted the .ost file in Outlook.
0
 
LVL 21

Expert Comment

by:theGhost_k8
ID: 18777452
greate
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question