Solved

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

Posted on 2007-03-21
10
5,813 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
 

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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now