Unable to Send Emails Using Redemption.SafeMailItem

56 Views Asked by At

I would like to send emails without getting the Outlook warnings hence the use of Redemption.SafeMailItem. However, my emails don't send. I have a feeling it may be the RDOSession.session I'm not getting right but I'm not sure. What may I be missing?

Sub UsingRDO()
'/*This script uses Redemption Com add in to send emails*/
Dim OlMail As Outlook.MailItem
Dim RDOSafeMail As Redemption.SafeMailItem
Dim AttachmentStr As String
Dim RDOSesh As Redemption.RDOSession

Set RDOSesh = New Redemption.RDOSession
Set OlMail = Outlook.Application.CreateItem(ItemType:=olMailItem)
Set RDOSafeMail = New Redemption.SafeMailItem
AttachmentStr = "C:\Users\Kennedy_Ngugi\Desktop\Faiba\"
       
RDOSesh.Logon , , False, False
        
        With OlMail
                .Body = "Hello" & vbCrLf & vbCrLf & "This is a Test Email"
                .BodyFormat = olFormatHTML
                .To = "[email protected]"
                .CC = "[email protected]"
                .Subject = "Internet Connectivity Test Email"
                .Attachments.Add AttachmentStr & "Kitchen Catalogue.png"
                .Attachments.Add AttachmentStr & "Sitting Room Catalogue.jpeg"
                .Attachments.Add AttachmentStr & "Madhatter COMPANY PROFILE.pdf"
                '.DeferredDeliveryTime = #8/1/2024 6:30:49 AM#
                
        End With
        
        RDOSafeMail.Send
        
End Sub

0

There are 0 best solutions below