• 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: Adding a message to a mailbox in Mail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding a message to a mailbox in Mail


  • Subject: Re: Adding a message to a mailbox in Mail
  • From: Michelle Steiner <email@hidden>
  • Date: Tue, 1 Oct 2002 12:00:11 -0700

On Tuesday, October 1, 2002, at 11:04 AM, cricket wrote:

You can't create new message objects and put them in mailboxes. I'm not sure exactly what you are wanting to do here. Mail's Applescript dictionary is intended to help automate typical user actions (create a new message and send it, move messages, get the data of a message and/or mailbox, set preferences, etc). What exactly are you wanting to do? If it's possible to do in Mail without Applescript, it's likely to be possible (or is planned for the future) in Applescript.

Well, with Claris Emailer, I had a script that would generate statistics from the mail database (how many messages in each folder, total number of folders); it would report the results by creating an incoming message in my in box. The script appears beneath my name.


Oh, BTW, will mail.app rules ever have the ability to add to the address book, add to groups, and/or remove from address book and/or groups?

--Michelle


tell application "Claris Emailer"
set theFolderList to the entire folder hierarchy
set theReport to ((count of the theFolderList) as text) & " folders" & return & return

repeat with theFolder in theFolderList
set thefolderName to the theFolder's name
set msgCount to count of theFolder each message
set theReport to theReport & thefolderName & my spacing(thefolderName, msgCount) & msgCount & return
end repeat

set theReportMessage to make new incoming message with properties {subject:"Message count", content:theReport, time sent:current date}
open theReportMessage
end tell

on spacing(foldername, theCount)
set spaces to " " --35 spaces
set padspaces to " " --5 spaces
set theSpaces to text (length of foldername) thru (length of spaces) of spaces
set thePadding to text (length of (theCount as string)) thru (length of padspaces) of padspaces
return theSpaces & thePadding
end spacing
_______________________________________________
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.
  • Follow-Ups:
    • Re: Adding a message to a mailbox in Mail
      • From: cricket <email@hidden>
References: 
 >Re: Adding a message to a mailbox in Mail (From: cricket <email@hidden>)

  • Prev by Date: Scripting TRHOUGH terminal
  • Next by Date: Changing codes.
  • Previous by thread: Re: [OT] Re: Adding a message to a mailbox in Mail
  • Next by thread: Re: Adding a message to a mailbox in Mail
  • Index(es):
    • Date
    • Thread