Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2007-03-21
10
Medium Priority
?
5,943 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
10 Comments
 
LVL 21

Expert Comment

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

Expert Comment

by:K V
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:K V
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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:K V
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:K V
ID: 18777452
greate
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

610 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