Hello,
New to AppleScript and I have searched for an answer and code example to no avail. Hopefully someone here can point me in the right direction.
I would like to use a rule in Apple Mail to forward the last retrieved (not read or selected) email, based on specific criteria. Essentially, I am looking to create a trigger mechanism for every email that gets retrieved into Apple Mail where the email will be analyzed for specific criteria (sender email address, recipient email address, and email account, although this may be redundant with recipient email address).
Most if this can be done very easily with an Apple Mail Rule, with one exception: I need to send it from a different email account (defined in Apple Mail) from the account in which it was received. This requirement is what has me looking at a possible AppleScript solution.
I think my sticking point is that everything I have tried, based on examples I have been able to find, expects the action to be performed on the currently selected email in Apple Mail. I would like this action to occur without any intervention from the user, but when an email is retrieved into Apple Mail (Get Mail).
Any ideas how I can get this to work?
Thanks,
Mike