Forum Discussion
eykxas
6 years agoRegular Contributor
No. But I've found a workaround with this code :
function outlook_checkTC12(myInbox, folder, messageBody, subject){ var inbox, i; var msOutlook = Sys.OleObject("Outlook.Application"); var mapi = msOutlook.GetNamespace("MAPI"); mapi.Logon("Outlook","password",false,true); mapi.SendAndReceive(false); Delay(10000); var found = false; if(myInbox==undefined) myInbox = get_inbox_outlook(); if(folder==undefined) folder = "Boîte de réception"; var inbox = mapi.Folders(myInbox).Folders(folder); Log.Message(inbox.Items.Count + " e-mails"); for (i = 1; i <= inbox.Items.Count; i++) { toolEmail = inbox.Items.Item(i); body = toolEmail.Body; subject = toolEmail.Subject; if (body.indexOf(messageBody) != -1 && subject.indexOf(subject) != -1) { Log.Message(toolEmail.Body + "And " + toolEmail.Subject); Log.Message("The body and subject of the mail are verified"); Log.Message("Number of attachments: " + toolEmail.Attachments.Count); //Attachments for(j = 1;j<=toolEmail.Attachments.Count;j++){ Log.Message("Name of attachments"+j+" : " + toolEmail.Attachments(j).FileName); } //toolEmail.Delete(); found=true; break; } else { continue; } } if(!found){ Log.Error("The body and subject of the mail are not found"); } msOutlook.Quit(); }
Related Content
Recent Discussions
- 3 days agoMW_Didata