D
Daniel Lamarche
Hello. I would like soo much to be able to send an email properly with
Redemption installed in the Reference.
I'm in Access 2000. When I try this code I get an error message saying
"Could not resolve the message recipient."
Of course Daniel Lamarche is one of the Contact. The same happens if I use
an email address instead of the contact name. For instance
MailItemObject.Recipients.Add ([email protected])
Public Sub SendMailAgain()
Dim olApp As Outlook.Application
Dim olMailItemObject As Outlook.MailItem
Dim SafeMailItem As Redemption.SafeMailItem
Dim ns As Outlook.NameSpace
Set olApp = CreateObject("Outlook.application")
Set ns = olApp.GetNamespace("MAPI")
Set olMailItemObject = olApp.CreateItem(olMailItem)
Set SafeMailItem = CreateObject("Redemption.SafeMailItem")
SafeMailItem.Item = olMailItemObject
olMailItemObject.Body = "It would be nice it this one worked"
olMailItemObject.Subject = "Please!"
olMailItemObject.Recipients.Add ("Daniel Lamarche")
SafeMailItem.Recipients.ResolveAll
SafeMailItem.Send < It works better if I use
olMailItemObject.Sent
Set olMailItemObject = Nothing
Set SafeMailItem = Nothing
Set olApp = Nothing
Set ns = Nothing
End Sub
Any suggestion please? Thanks
Daniel Lamarche
Redemption installed in the Reference.
I'm in Access 2000. When I try this code I get an error message saying
"Could not resolve the message recipient."
Of course Daniel Lamarche is one of the Contact. The same happens if I use
an email address instead of the contact name. For instance
MailItemObject.Recipients.Add ([email protected])
Public Sub SendMailAgain()
Dim olApp As Outlook.Application
Dim olMailItemObject As Outlook.MailItem
Dim SafeMailItem As Redemption.SafeMailItem
Dim ns As Outlook.NameSpace
Set olApp = CreateObject("Outlook.application")
Set ns = olApp.GetNamespace("MAPI")
Set olMailItemObject = olApp.CreateItem(olMailItem)
Set SafeMailItem = CreateObject("Redemption.SafeMailItem")
SafeMailItem.Item = olMailItemObject
olMailItemObject.Body = "It would be nice it this one worked"
olMailItemObject.Subject = "Please!"
olMailItemObject.Recipients.Add ("Daniel Lamarche")
SafeMailItem.Recipients.ResolveAll
SafeMailItem.Send < It works better if I use
olMailItemObject.Sent
Set olMailItemObject = Nothing
Set SafeMailItem = Nothing
Set olApp = Nothing
Set ns = Nothing
End Sub
Any suggestion please? Thanks
Daniel Lamarche