osx - Getting Information about e-mail Attachments with Applescript -


i trying receive information attachments in mail app. far able receive data e-mail selected. additionally receive information attachments.

tell application "mail"     set selectedmessages selection     set themessage item 1 of selectedmessages     set themailbox mailbox of themessage     set mailaddresses email addresses of account of themailbox     return theattachment in themessage's mail attachments end tell 

the script works if use return mailadresses cannot information attachment. hints?

try this, return value contains data

  • themessage
  • themailbox
  • mailaddresses
  • name und mime type of attachments list

of each message of selected messages

tell application "mail"     set selectedmessages selection     set mailboxdata {}     repeat amessage in selectedmessages         set themailbox mailbox of amessage         set mailaddresses email addresses of account of themailbox          set attachmentdata {}         repeat anattachment in (get mail attachments of amessage)             tell anattachment set end of attachmentdata {name, mime type}         end repeat         set end of mailboxdata {themessage, themailbox, mailaddresses, attachmentdata}     end repeat     return mailboxdata end tell 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -