Wednesday, 24 May 2017

Sending mail from outlook using UFT

Set Outlook = CreateObject ("Outlook.Application")


Dim Message 'As Outlook.MailItem


Set Message = Outlook.CreateItem(olMailItem)


With Message
.Subject = Subject
.HTMLBody = TextBody
.Recipients.Add (aTo)
Const olOriginator = 0
.Send
End With