Re: Scripting Mail.app
Re: Scripting Mail.app
- Subject: Re: Scripting Mail.app
- From: Reinhold Penner <email@hidden>
- Date: Sun, 13 Jan 2002 11:31:10 -1000
Cricket,
thanks for the clarification on Mail's scriptability. Since it seems
that I can't do now what I want to do, please consider them as feature
requests. The reason I would like to do the things I mentioned are,
because I now have written a cool server-side email notification system
(similar to NotifyMail, but not Finger-based, and a lot more powerful).
It works as follows:
- On the remote mail server I have a .forward file that pipes a new
incoming message to a Perl script in my home directory.
- The Perl script presently reads the mail headers From, To, and Subject
and sends them via a POST command to a Perl cgi on my Mac (running
Apache). I am contemplating of adding the body as well (heck, I could
get rid of Mail.app entirely ;-)
- The Perl cgi on my Mac processes the post and writes the values of the
headers to a text file
- My ASS app periodically checks the size of text file and when
modified, notifies me with the count of new messages as well as the
sender and the subject. I can then decide whether I want to fetch mail
or not. How I wish AS would let me handle cgi requests!!!!!! Then I
could entirely get rid of the Perl cgi business on my Mac and process
the incoming stuff within my app.
- Finally, this works from work where I have a static IP as well as from
home where I have a dynamic IP, since on startup, my ASS app
automatically sends my IP address to the mail server through yet another
Perl cgi on the mail server.
All of this is working just fine, but I'd like to stop the schedules in
Mail.app and only trigger it to fetch through my ASS app. Unfortunately,
as you say, Mail.app doesn't yet let me do this under script control.
But, in the meantime, I have found a kludge to kinda do what I want:
Instead of telling Mail.app, I simply open the INBOX file in my
~/Library/Mail/ folder, which fortunately also triggers Mail.app to
fetch mail.
-Reinhold
P.S.: I checked your header and found this: "X-Mailer: Apple Mail
(2.502)" :-) I want that too. Can I please enroll for beta testing
Mail.app? I already have plenty of bugs to report ;-)
P.P.S.: How on earth did you get the cricket graphic into your message?
Is this a new feature of Mail.app? If there's another trick to do this,
please let me know.
P.P.P.S.: Some people are bashing Mail.app, but IMHO this is already the
coolest email client around anywhere and will only get better with the
next versions.