• 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
Problems with creating header key rules in Mail.app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with creating header key rules in Mail.app


  • Subject: Problems with creating header key rules in Mail.app
  • From: Ulrich Kortenkamp <email@hidden>
  • Date: Fri, 31 Oct 2003 21:05:39 +0100

Hi,

I am still trying to fix the "Create New Mailing List Mailbox___ctl-m.scpt" that came with Panther. I had to remove some "as string" things, but now it basically works -- only the rule creation fails badly.

When I do

make new rule condition at beginning of (rule conditions of newRule) with properties {rule type:header key, header:headerKey, expression:listIdHeader, qualifier:equal to value}

this creates a new rule, but of type "any header contains". I suspect that this is a due to the header-property not being set properly, but I do not understand enough of AppleScript to be sure. Does anybody succeed in creating a custom header rule with Mail.app using AppleScript?

Here is what I think should work, but does not...

tell application "Mail"
set newRule to make new rule at end of rules with properties {name:"Test Rule"}
delete rule conditions of newRule
-- the following does not work, the headerKey is not set and the rule type will be wrong...
make new rule condition at beginning of (rule conditions of newRule) with properties {rule type:header key, header:"X-Mailer", expression:"Apple Mail (2.606)", qualifier:equal to value}
set enabled of newRule to true
end tell

This creates a rule with the condition "Any Recipient contains Apple Mail (2.606)" instead of "X-Mailer equals to Apple Mail (2.606)"...

Is this a bug of Mail.app? Or AppleScript? Or can I do something to be sure that "header:" is a property and not a class? Anybody out there who can help me?

Thanks,

Ulli
_______________________________________________
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.

  • Prev by Date: Re: Replying to Apple lists
  • Next by Date: Startup mounting is currently not supported for this log on method
  • Previous by thread: Need jump start on listing contents of folders
  • Next by thread: Startup mounting is currently not supported for this log on method
  • Index(es):
    • Date
    • Thread