Try this, best of luck
Code:
Dim ToAddress
Dim Subject
Dim Body
Dim Attachment
Dim oUtlookApp, nAmeSpace, newMail
ToAddress = "xyz@gmail.com" ' Message recipient Address
Set oUtlookApp = CreateObject("Outlook.Application")
Set nAmeSpace = oUtlookApp.GetNamespace("MAPI")
nAmeSpace.logon
Set objfolder=olns.getdefaultfolder(6)
objfolder.display
Subject = "This is a test mail" 'Message Subject you can update
Body = "This the message for testing. " 'Message body you can update
newMail.Subject = Subject
newMail.Body = Body & vbCrLf
newMail.Recipients.Add(ToAddress)
newMail.Attachments.Add("D:\Automation\report\login.html") 'You can update attachment file name
newMail.Send
Set nAmeSpace = Nothing
Set oUtlookApp = Nothing
