Solved

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

Posted on 2007-03-21
10
5,866 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: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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

733 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