invoke-scriptBlockOnOutlookMails (of the Powershell Module Outlook) iterates over each mail in the inbox and the sent folder and calls the script block that was provided as argument to the function. invoke-scriptBlockOnOutlookMails is save-outlookMails.