• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Mail Rule Conditions with Jaguar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail Rule Conditions with Jaguar


  • Subject: Re: Mail Rule Conditions with Jaguar
  • From: Christopher Nebel <email@hidden>
  • Date: Tue, 10 Feb 2004 19:02:39 -0800

On Feb 9, 2004, at 12:35 AM, Jutta Wrage wrote:

I tried to create a script to make rules for mailing lists in mail.app.

The rule condition is supposed to be set to match the mailing list headers as List-Id, X-Mailinglist and so on. But no success.

To figure out the type of existing rules matching mailing list headers, I crated the following script (do not run with many rules!):

tell application "Mail"
set theRules to rules
repeat with theRule in theRules
set theRuleName to name of theRule
set theConditions to rule conditions of theRule
repeat with theCondition in theConditions
set theType to type of theCondition
display dialog theRuleName & "." & return & theType & "." buttons {"OK"} default button 1 with icon 1
end repeat
end repeat
end tell

But I do not get the correct type for my mailing list rules - I do not get any type for some of the existing rules at all. Am I in error or is there really no way to create rules matching custom headers by Script?

Everything works fine with my script. But only the type ist automatically set to from header. I tried to set it to "type:ListField" where ListField is one of "X-List", "List-Id" and so on. There are existing rules matching these fileds, so missing headers cannot be the problem.

This appears to be sort of busted in Jaguar, but it works fine in Panther. For example, I tried this:

tell application "Mail" to tell rule "applescript-users"
get {name, properties of every rule condition}
end

In Panther, this produced

{"applescript-users", {{expression:"applescript-users", rule type:header key, class:rule condition, header:"List-Id", qualifier:does contain value}}}

...which is what you'd expect. In Jaguar, I get this:

{"applescript-users", {{type:stop, class:rule condition, expression:"applescript-users", qualifier:does not contain value}}}

...which is bogus. I also notice that the "rule condition" class in Jaguar Mail simply doesn't have enough properties to express tests on custom headers. You *might* be able to bludgeon it into working on Jaguar, but on the whole I'd recommend upgrading.


--Chris Nebel
AppleScript Engineering
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Mail Rule Conditions with Jaguar (From: Jutta Wrage <email@hidden>)

  • Prev by Date: Re: Droplet that crash
  • Next by Date: Distribution of Applications
  • Previous by thread: Mail Rule Conditions with Jaguar
  • Next by thread: [ANN] Extra Suites 1.1
  • Index(es):
    • Date
    • Thread