0

I am a music supervisor and I receive lots of emails with links to download new music. I'd like to sort these into their own folder automatically. Is there anyway to sort emails that have links to certain websites like box.com or dropbox? I would sort them by the person that sends them but then I'd miss the personal emails that they send me as well. Any suggestions of how this could be done?

1 Answer 1

1

I assume you're wanting to use a trigger in mail to triage messages as they come in. You will create a local mailbox named "Music" or whatever, and then set the mailbox property of the message to "Music" if its source data contains any of the trigger URLs. Set up the rule using a script like this:

property urlList : {"box.com", "dropbox.com"}

using terms from application "Mail"
    on perform mail action with messages theSelectedMessages for rule theRule
        repeat with thisMessage in theSelectedMessages
            set theSource to source of thisMessage
            repeat with thisURL in urlList
                if thisURL is in theSource then
                     set mailbox of thisMessage to mailbox "Music"
                    exit repeat
                end if
            end repeat
        end repeat
    end perform mail action with messages
end using terms from

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .