• 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
Modifying incoming mail subject
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Modifying incoming mail subject


  • Subject: Modifying incoming mail subject
  • From: Michaël Grünewald <email@hidden>
  • Date: Wed, 26 Dec 2007 13:50:20 +0100

Hi,

Using Mail app, I am trying to create an Applescript rule that do modify incoming mail subject line. (I want to remove some fixed input in mailing added by a mail manager.)

I have written the following applescript, save in a file and added as a rule. It does not work (not any symptom of activity). As I am new to applescript, I am looking for help to make it work.

using terms from application "Mail"
	on perform mail action with messages theMessages for rule theRule
		tell application "Mail"
			repeat with each in theMessages
				set subject to subject of each
				set text item delimiters to "[Caml-list] "
				set answer to ""
				repeat with part in text items of subject
					set answer to answer & part
				end repeat
				set subject of each to (answer)
			end repeat
		end tell
	end perform mail action with messages
end using terms from


Note:

1. If it is possible to plug a Unix filter in incoming mail's pipe, that will also work for me!

2. Having an honest Unix background, I would be very pleased to recycle my comptentences with MAC OS X software. My first impressions with MAC OS X is that the Unix side (shell + pipes) and the Apple side (app + applescript) that do coexist in MAC OS X are very alien one to the other. Are there some bridges between these two worlds or are my first impressions somewhat right?

Thanks for your attention and for the help you could provide,
cheers,
Michie





___________________________________________________________________________ Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
http://fr.mail.yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden
  • Follow-Ups:
    • Re: Modifying incoming mail subject
      • From: has <email@hidden>
  • Prev by Date: Re: Scripting Print Orientation
  • Next by Date: Organizing AppleScripts
  • Previous by thread: Re: How to generate a file difference report?
  • Next by thread: Re: Modifying incoming mail subject
  • Index(es):
    • Date
    • Thread