BlakeMcKenna
Active member
- Joined
- Oct 27, 2008
- Messages
- 38
- Programming Experience
- 10+
I am using the Outlook Redemption Object library and having a difficult time in using the RDO Objects. All I'm trying to do is send multiple emails using email information from a .csv file. I've used the Redemption Objects before successfully but not the RDO Objects and the reason I need to use RDO is because I need to assign an email address to the "Sender" Property of the RDOMail Object. Below is the code I have so far. Any help is sure appreciated.
I keep getting the following error on the highlighted line of code:
"Unable to cast object of type 'System.String' to type 'Redemption.RDOAddressEntry'."
Please help!
Thanks,
Blake
VB.NET:
Private Sub CreateEmail2(ByVal strRecipient As String, _
ByVal strFrom As String, _
ByVal strType As String, _
ByVal strSubject As String, _
ByVal strAttachment As String)
Try
Dim Session As Redemption.RDOSession = CreateObject("Redemption.RDOSession")
Session.Logon()
Dim mail As Redemption.RDOMail
With mail
[COLOR="Red"].Sender = strFrom[/COLOR]
.To = strRecipient
.Subject = strSubject
.RTFBody = BodyText(strType)
.Attachments.Add(strAttachment)
.Save()
.Send()
End With
Catch ex As Exception
sErr.clsProcedure = "CreateEmail2()"
sErr.clsMsg = ex.Message
sErr.WriteToTextFile(strErrorFileDirectory, strErrFile)
End Try
End Sub
I keep getting the following error on the highlighted line of code:
"Unable to cast object of type 'System.String' to type 'Redemption.RDOAddressEntry'."
Please help!
Thanks,
Blake