Apple Script to apply rules in Mail.app

  • I've created some rules in my Mail.app to change the background color of specific messages
  • And I also created rules in the mail server in order to move the messages to a folder

For messages in the Inbox folder, everything is fine.

But if the message has been moved by the server rule in another folder, then rules the Mail.app do not apply (and reasons twisted, this is normal: https://support.apple.com/kb/PH19162?locale=en_US & viewlocale = en_US).

Then if I apply the rules manually by pressing Command + Option + L < code > < code >, Mail.app rules will apply as they should.

I want to automate this action. Is it possible with Apple Script? Can you help me with this? The steps would include, I guess that:

  1. Choose the smart folder "today."
  2. Select all messages in this folder;
  3. Perform the action "Rules" for selection.

< pre >

using terms from application "Mail".

Tell application "Mail".

the value of the message_count in HOW-TO-GET-MESSAGES-FOR-TODAY-SMARTBOX County

Repeat with i from 1 to the message_count

the value this_message to article i of MESSAGES TODAY ' HUI-SMARTBOX

say this_message

-That's something like the RULES APPLY

tell the end

end repeat

tell the end

end using terms from

< / pre >

If it is not possible for a smart folder, then I want to do, it goes all messages in all mailboxes mailbox (or with messages in the specific mailbox).

Apparently, this is not possible as long as such action is not be scriptable.

Tags: Mac OS & System Software

Similar Questions

  • Mail.app rules prevent any actions after you have moved the message

    If the rule in the Mail.app contains action Message go to any folder, then all the other measures of the rule does not apply automatically. Only if I hit the rules manually.

    If I remove this action, then other actions of the rule will be applied automatically.

    It is similar to the document the behavior, but again, it is a rule in Mail.app, not the rule in the mail server.

    Why is this? Is this a bug? Is it possible to fix it?

    Here's similar question more then there is still no response year: ly http://apple.stackexchange.com/questions/168621/mail-app-rule-works-only-partial

  • Apple mail app

    A great feature for this mail app would be a touch sign in for each time you open the mail application. This would allow privacy and security for those interested.

    Suggestions for Apple go on their feedback page, http://www.apple.com/feedback

    Apple does not participate in the forum here, this is a user to user support forum. Security for the iPad is handled by the access code for the iPad. Currently, Apple does not and has never supported passwords for individual applications on devices.

  • How to create rules to move mail junk folder junk mail automatically using window 8 mail app?

    Original title: spam

    How to create rules to move mail junk folder junk mail automatically using window 8 mail app?

    I don't think that the Mail App in its current form has this feature.

  • Mail App removed from iPhone6s

    The Mail App is removed from the iPhone to my husband 6 s. How do we get this back. I tried to reset the home screen and the tree Mail search in Spotlight.

    Assuming you are using iOS 10 and actually deleted.

    Access the App Store and search for Apple Mail. You can reinstall it from there.

  • Where are my rules of mail under macOS Sierra?

    Hello

    I lost all my rules of mail after upgrade to OSX 'El Capitan' to macOS Sierra.

    Appears that the rule of 'Apple News' as shown in the image below.

    Any help appreciated.

    Thank you.

    Rule files are stored in MailData folder in the Library/Mail/V4 of the user folder. Depending on what OS version you had previously installed, you can try to restore the files from a backup rules. Mail was listed in the folder V2 or V3.

    The rules are stored in a list of properties to:

    ~/Library/Mail/V4/MailData/SyncedRules.plist 

    Abandonment of post

    Restore the plist file

    Restart the messaging

    You will need to re-enable each rule. Check the destination file as well.

    Library of the user to see the

    The user library folder is hidden by default. In the unhide: select the Finder in the Dock. Less go in the Menu bar > hold down the Option key and you will see the library.

    Find the library user folder

    http://www.takecontrolbooks.com/resources/0167/site/chap11.html#FindingtheUserLi braryFolder

  • Mail.app: S/Mime encrypted attachments do not work under MacOS Sierra

    Hello

    I can't send or receive attachments when messages are encrypted with S/Mime since the upgrade to Sierra. Attachments sent and received on a MacOS-El-Capitan is available on El Capitan. But the same messages with attachments is more available on Sierra, as well as new messages with attachments sent from Sierra can be viewed on El Capitan or Sierra. Looks like the handling of encrypted attachments is completely screwed.

    The indication for messages with encryption and signature is still flaky and is not consistent.

    The indications for encryption and signing is a bug for years. What is interested in someone at Apple Mail.app and S/Mime? It doesn't seem a Herculean task to do things, and it is a core feature.

    Thank you

    iMac MacOS 10.12

    Mailing address:

    Version: 10.0

    Obtained from: Apple

    Last modified: 30/08/2016, 05:53

    Kind: Intel

    64-bit (Intel): Yes

    Signed by: signature, CA software, certificate authority root signing of Code Apple Apple

    Location: /Applications/Mail.app

    S/Mime, workstation is version 9.3.

    I have the same problem see my post on the import of attachments.

    Mail attachments disappeared with Sierra

  • Mail app crashes after updating iOS 10

    I've just updated to iOS 10 on my 4 32 GB iPad. The Mail app often closes unexpectedly. I have no problem to use it again, but it's boring. Since this is an Apple app, I can't uninstall & install again. Any suggestions?

    You have rebooted the iPad? Hold down the sleep and home buttons until you see the Apple.

  • Mail app: can't see the IMAP shared folder in iOS10

    Since I updated my iPhone to iOS10 I see the shared folder of the IMAP in the Mail application. IOS9 until the Mail app displays all folders shared IMAP that you were able to subscribe. It was dependent on the setting of the IMAP path prefix. Even I have try different settings I don't recognize any different behavior.

    I have found no comment from Apple for this.

    Someone at - he noticed the same problem? Is there an attempt to solution?

    Same question, very exasperating.  I noticed one thing was that if you delete the account and start over, shared folders are there, at least initially.  If you leave the app and come back later, they are gone.  I suspect that a prefix is stored in the application state that prevents later shared folders to be seen.  I noticed that other applications also have problems, see the shared folders, including by aircraft and shipping, though.  I really liked having access to those from before this update - difficulty please!

  • iOS 10 Mail app - threads are impossible to read with style answer-everything Outlook (without quotes)

    Outlook and the Mail app both old showed you a list of e-mails in a thread; If you want to dive to an email, you must click on this email.

    The new view of thread is essentially impossible to use now, since there is no view that shows each email in a list. Instead, if reply - all on your e-mail service does not add to citing it vertically and mark a horizontal line between the contextual emails, you end up seeing the WHOLE thread in each individual e-mail. It's 100% fine if you also have a vision where you can see every email truncated in a list. But this is no longer the case.

    I'm going to have to cut the wires completely from my computer (Outlook) is impossible for me to read in the current state.

    100% behind you! Please Apple, can we have an option to make the threads as they were in the iOS 9? It was actually a useful feature. In iOS 10, it is completely impossible / a lot of your time!

    Even if the quirks have been developed and e-mails would collapse correctly it is always not very useful when you have long filaments (which, when you use mail app for email to work can happen in the course of a single day with 20-30 + emails).

  • How can I transfer files from aol safari app to the mail app?

    People,

    I'm trying to transfer my files from my aol email in safari for my mail app on my Mac Air 13?  What should the steps I'm indoing this?

    Thanks in advance

    AOL provides the documentation here

    https://help.AOL.com/articles/how-do-i-use-other-email-applications-to-send-and-Recevoir-my-AOL-mail

    Excerpt:

    Mail for Mac (Apple)
    Set up your AOL email account or email

    1. launch the Mac Mail using the mail icon on your dock.

    2. click on the menu of messaging in the upper left corner of the screen next to the symbol of the Apple.

    3. click on accounts...

    4. scroll until you see AOL on the right side of the window and click on it.

    5. Enter your AOL email account information in the fields.

    6. click on connect / setting up, depending on which version of Mac OS x you are using.

    7. once the account information has been validated you will be invited to a new window. Select the applications you want activated by placing a check mark in the box next to the application.

    8. click done once, finished activating/deactivating the Apps.

    That's all! Your AOL email account has been set up in the Mac Mail.

  • E-mail woes! IMAP and Mail.app

    I just upgraded to a new computer with 10.8.5 installed (that's as far as going to 10.8).

    Seems that Comcast now requires us to use the IMAP system, which is horrible, because it creates all kinds of unwanted records, he spits in your Mail.app (CAT? That devil has time to CHAT?) and when you try to clean your phone or iPad, it removes them from your computer too! BAH!

    I tried to bypass it by selecting in the mail acct prefs each "NEVER erase" I can't see... any suggestions?

    Then, I never thought that I have it would take, but y at - it a suggestion for a program of mail 3rd party replacement in lieu of Mail.app?

    Problems with Mail.app is that there is no colour and that it is difficult to see (at my age, my eyes is although I don't even wear glasses to bifocals yet), and it's glitchy that you can try to customize the toolbar and it freezes completely, forcing you to quit and restart.

    It is very difficult to read, enter tasks and scroll bars are missing and he lost the ability to click a button when you want to paste in HTML messages and not to lose the formatting. The controls are weak and slow, but maybe it's because the IMAP that seems to remotely control your email!

    So I thought instead that swear on this subject, as I did for two days now, I come here and ask what alternative exists for the mail.

    If Apple continues in the direction to emulate a badly coded and difficult to see and use the PC, I don't see how it will benefit financially. I did not pay 4 X as much for a Mac just to fight with the same problems people have on much lower (used to be anyway) PCs.

    Apple is listening to its customers (1996) for a long time?

    Please visit your site to assistance of the provider, ComCast, email and find the page they provide showing how to put in place various email applications including mail on your computer. Note that this is not a rant site or a complaint. It is possible that the moderators can delete or re - write your message for this reason.

  • Comcast mail will not work on Mail.app PORT 995 problem once again!

    OK, so this problem has arisen in the last days.

    I can't send or receive mail from Comcast in Mail.app

    At first, it was the 995 problem, but now it just says:

    The server returned the error: the attempt to send data to the server "mail.comcast.net" failed.

    After three calls to Comcast, told me it's because Mail.app, because "Apple changed something in the application.

    Is not the thing the more ridiculous than you already heard? I have not updated anything either and to my knowledge, Apple is just change your app on your hard drive.

    Twice before, Comcast, once they have admitted that the problem was theirs, has been able to fix it. But not now.

    Yes I can get mail on the web, but it's stupid, and I need to use the POP email... I work online all day.

    They suggested one of the ports be changed from 587 to 465 but that doesn't work anymore. I use SSL with PW auth.

    I have set up scores of Mac for people and this isn't a problem with Mail.app, but a Comcast server problem that they will NOT admit.

    Anyone having this problem and what to do? I have about 50 other emails configured, are not those of the areas will on the same PIPE and using the VERY SAME SETTINGS to SEND?

    Have you tried the settings for IMAP e-mail? Or is your requirement such that you need POP?

    http://customer.Xfinity.com/help-and-support/Internet/email-client-programs-with - xfinity-email.

    How to set up a Comcast Email in Mail | CityMac

  • iOS 9.3.1 Mail App crashing on the main window - a SOLUTION. Can be linked to rogue/spam email

    I had a problem with Mail crashing several times today and was close to restore my phone but am happy that I stumbled upon a solution until I did it!

    I'll copy / paste of the other post I made on the discussion board:

    I had a problem this morning with the Mail App unexpectedly crashing when opening on my 5s iPhone running iOS 9.3.1 (last updated).

    In case someone knows something similar, I found a solution that was remarkably easy.

    Trying to open a mail, the app would show the display of messages for a fraction of a second, and then the crash. Nothing worked - quit smoking and a retry of the app, reboot / hard re-boot of the iPhone, leave all specific applications, disabling of e-mail accounts, settings etc.. I was beginning to think that I have to do a hard system restore, but thank God I have not, as it is a major PITA and I found the unexpected solution.

    In any case, I noticed that I could get in Mail by opening one of my emails from the Notification screen. Everything seemed fine, but if I close this message to return to the main window of Mail, the application crashed once more. The main window is appeared to be the culprit. I noticed that several new Spam messages were visible on this screen this morning.

    So here's how I found the solution: my computer, I myself sent a priority email, which came on my screen of notifications. By using this link directly to open the message, Mail worked fine again. Then by using the arrows to zip directly from a message to a message, I worked my way through the new emails, including the unrecognized Spam I deleted. Once they were gone, I back-arrow in the main screen of Mail and Voila! No more crash.

    So, apparently, there are messages that can crash the Mail app on iOS 9 simply by being visible in the main window. Be aware of this and if this happens to you, with Mail blocks instantly whenever you open it, try this approach before restoring your system software.

    You could also try resetting your e-mail account. First close your Mail application completely from the window of the selector app by double clicking the Home button and drag the email preview pane up until it disappears from the display. You may need to search the mail pane covering scribbles to the left. Then go to settings > Mail, Contacts, calendar > find your e-mail provider and click on the account. On the next page, delete the account. Then perform a forced reboot. Hold down the home and Sleep/Wake buttons simultaneously for about 15-20 seconds , until the Apple logo appears. Then go to settings > mail... and to add the account.

  • Safari and mail app freeze 9.2.1 ios and ios 9.3

    Safari and mail app freeze on my ipad mini 4 (9.2.1 ios and ios 9.3) in these last two days each time if I touch to create a link in the email or on the web page.

    I tried to turn off the power of java script in safari... always gel

Maybe you are looking for

  • The option of missing carrier

    My dads iPhone 4 has been focused on eBay as a refurb and works well for more than a year. But just recently it cannot connect to the O2 network or any network. Nothing has changed and I tried my own SIM inside and nothing changes. It connects to the

  • Hello. I have some problems with my ATI graphics card

    I have a 4540 s HP's Probook. Whenever I open my laptop, it says this: WARNING: The Catalyst Control Center is not supported by the version of the graphics adapter driver you activated. If you please update your ATI graphics driver or enable your ATI

  • Cannot install the Trusted Platform Module Driver / software

    I am not able to install the driver of the TPM secure and so I'm not able to install the TPM software... I have a satellite u200, and it's on my tools and utitilities cd. Installation always says "Trusted Platform Module not found" someone at - it th

  • HP G62 turn not

    I have a HP G62 I've had for about 2 years. It started crashing not too long and has gotten to the point where about five minutes after that be turned on he would give me the blue screen with white rental and restart the computer. Now it won't even t

  • printing system Windows 7 64 bit problem

    I get the message when you try to print with a network hp envy printer 4500 series: printer not available.  Select another printer. The scanner works fine.  I can scan a document and save it on my laptop and print without any problems.  Will not prin