• 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: Entourage Rule to modify incoming email message source
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Entourage Rule to modify incoming email message source


  • Subject: Re: Entourage Rule to modify incoming email message source
  • From: "Laine Lee" <email@hidden>
  • Date: Thu, 26 Oct 2006 13:33:15 -0500

Thank you Gary (Lists), Philip Kearney, Allen Watson, John C. Welch, and Paul Berkowitz. Chances are more iterations of the undesired code will occur so I'll probably just throw in a list of each possible interspersion of "=" and ascii character 13 in the string "DEFANGED_".

------

set theFile to ((path to desktop from user domain) as string) & "ReFANGtarget.eml"

tell application "Microsoft Entourage"
    set theMessageList to the selection -- (This can be changed to " set theMessageList to current messages as list" to be used in conjunction with a rule)
    save item 1 of theMessageList in theFile
    delete theMessageList
end tell

repeat
    try
        set r to read alias theFile
        set _fixed to my remove_DEFANGED_(r, "DEFANGED_")
        set _fixed to my remove_DEFANGED_(_fixed, "D=" & (ASCII character 13) & "EFANGED_")
        set _fixed to my remove_DEFANGED_(_fixed, "DEFANGE=" & (ASCII character 13) & "D_")
        set _fixed to my remove_DEFANGED_(_fixed, "DEFANGED=" & (ASCII character 13) & "_")
        set _fixed to my remove_DEFANGED_(_fixed, "D=" & (ASCII character 10) & "EFANGED_")
        set _fixed to my remove_DEFANGED_(_fixed, "DEFANGE=" & (ASCII character 10) & "D_")
        set _fixed to my remove_DEFANGED_(_fixed, "DEFANGED=" & (ASCII character 10) & "_")
        exit repeat
        delay 1
    on error ther
        display dialog ther
    end try
end repeat

tell application "Microsoft Entourage"
    make new incoming message at folder "inbox" with properties {source:_fixed, read status:read}
end tell

on remove_DEFANGED_(this_text, bad_string)
    set AppleScript's text item delimiters to the bad_string
    set the item_list to every text item of this_text
    set AppleScript's text item delimiters to ""
    set this_text to the item_list as string
    return this_text
end remove_DEFANGED_

------

Laine Lee
 _______________________________________________
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/mailman//archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: How can I open attachment in Mail ?
  • Next by Date: Re: Writing to file as UTF8 with BOM ?
  • Previous by thread: Re: Entourage Rule to modify incoming email message source
  • Next by thread: Getting A Firefox Url
  • Index(es):
    • Date
    • Thread