Hi,
I am writing Autoit script to send a mail, wait till its received, read it and then delete it. The objecttive here is to know how to confirm that I have received this email and read it and delete it. Am from a security company so I'm automating the outlook scanning for all the emails. The task is...
1) Send a mail
2) Wait till I receive that mail.
3) Read it
4) Delete it.
Note : I'm running the automation from the machine where am sending and receiveing the mail. (I'm sending the mails to self)
I have written for 'sending a mail' and this works fine, please find below the code. But am not able to write the code for the above steps 2) , 3) and 4).
Can somebody help please?
---------------------------- CODE FOR SENDING A MAIL ----------------------------
$File_path = "Path of the attachment"
Func SendAndReadMail($File_path)
$Outlook = ObjCreate('Outlook.Application')
$mail = $Outlook.CreateItem(0)
$mail.Recipients.Add("agovada@ex2k.com")
$mail.Body = $File_path
$mail.Subject = $File_path
$mail.Attachments.Add($File_path)
$mail.Send
EndFunc
--------------------------------------------------------