Zip email with con AppleScript

applescriptemailmail.appzip

I need to zip all email that have in the body this words "Identificativo messaggio: CA3DA789.008822A5.C33F80AE".
I have many email in AppleMail so i think if it's possible to create an AppleScript that select all email that have in their body this Word "Identificativo messaggio: CA3DA789.008822A5.C33F80AE".
Once AppleScript find these mails, unzip them and tell me where Save the file zip and with witch name.
It's possible to create this AppleScript ?

Every day i must zip the email and with search box i need of much time. So i think to use an AppleScript that work in this mode: I select an mail that contain "identificativo n. *****" and Applescript find all Mail with the same "identificativo n. *****". After selected mail, i could zip these files or stamp with their attachements.

Best Answer

It's certainly possible to do this with AppleScript, but depending on how often you need to do this it might be simpler to just

  • Use the search box within Mail to list all mails containing this specific string
  • Drag them into a folder on the Desktop
  • Compress/zip that folder