bboo
asked on
Send email using VB .net using RDO with Redemption.dll
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.R DOSession" )
Session.Logon()
Mail = Session.GetDefaultFolder(R edemption. rdoDefault Folders.ol FolderInbo x)
Mail.Recipients.Add("eater s@lunch.co m")
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;D on't care"
Mail.Send()
End Sub
I get the following error message on this line of code:
Mail = Session.GetDefaultFolder(R edemption. rdoDefault Folders.ol FolderInbo x)
Error message :
An unhandled exception of type 'System.Runtime.InteropSer vices.COME xception' 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.
References to:
Outlook
Redemption
Private Sub TESTRDO()
Dim Session As Redemption.RDOSession
Dim Mail As Redemption.RDOMail
Session = CreateObject("Redemption.R
Session.Logon()
Mail = Session.GetDefaultFolder(R
Mail.Recipients.Add("eater
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;D
Mail.Send()
End Sub
I get the following error message on this line of code:
Mail = Session.GetDefaultFolder(R
Error message :
An unhandled exception of type 'System.Runtime.InteropSer
Additional information: Error in IMAPISession::OpenMsgStore
Error: The information store could not be opened.
Component: MAPI 1.0
Thanks in advance for any help here.
afaik ur session has some problem i think.
Dim Mail As Redemption.RDOMail
Mail = Session.GetDefaultFolder(R edemption. rdoDefault Folders.ol FolderInbo x)
How can u assign GetDefaultFolder(...) to Mail...??
Mail = Session.GetDefaultFolder(R
How can u assign GetDefaultFolder(...) to Mail...??
GetDefaultFolder(FolderTyp e)
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
FolderType - integer. The type of default folder to return. Accepts the same values as Namespace.GetDefaultFolder
It Returns RDOFolder object.
and you are assigning it to RDOMail object. WRONG !!!
read more:-
http://www.dimastr.com/redemption/rdo/rdosession.htm#methods
ASKER
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.R DOSession" )
Session.Logon()
' The code gives error on the line below
Inbox = Session.GetDefaultFolder(R edemption. rdoDefault Folders.ol FolderInbo x)
Mail.Recipients.Add("eater s@lunch.co m")
Mail.Subject = "Lunch anybody?"
Mail.Body = "Please open the message and click on one of the buttons"
Mail.VotingOptions = "Chinese;Italian;Mexican;D on't care"
Mail.Send()
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.R
Session.Logon()
' The code gives error on the line below
Inbox = Session.GetDefaultFolder(R
Mail.Recipients.Add("eater
Mail.Subject = "Lunch anybody?"
Mail.Body = "Please open the message and click on one of the buttons"
Mail.VotingOptions = "Chinese;Italian;Mexican;D
Mail.Send()
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
show whole message.. line number..
try catching exception of type COMException.
ultimate help is this:
dmitry@dimastr.com
ASKER
CreateTSEmail.exe is the application name.
This is the same message I sent above.
An unhandled exception of type 'System.Runtime.InteropSer vices.COME xception' occurred in CreateTSEmail.exe
Additional information: Error in IMAPISession::OpenMsgStore : 0x8004011D
Error: The information store could not be opened.
Component: MAPI 1.0
This is the same message I sent above.
An unhandled exception of type 'System.Runtime.InteropSer
Additional information: Error in IMAPISession::OpenMsgStore
Error: The information store could not be opened.
Component: MAPI 1.0
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
greate