Re: From Mac Os X Mail to FileMaker
Re: From Mac Os X Mail to FileMaker
- Subject: Re: From Mac Os X Mail to FileMaker
- From: Jonathan Bird <email@hidden>
- Date: Thu, 02 Oct 2003 10:55:32 -0600
Here is an example that I cooked up. I actually was planning on doing
this exact thing, your email prompted me to get off my butt and figure
it out!
You will need to create a FileMaker database with the appropriate
fields to try this (see filmaker tell block below)
I am debating on whether to create all the fields manually (set from,
set subject) or parse out the raw source with calculated fields...
One thing with the raw source getting set in the field I had to do a
substitute calculation in another field (Email Header Cleaned) to get a
(carriage return?) character out of the "Email Header" field. (e.g.
Substitute(Email Header, "<CR/LF character here>", "6"))
on perform_mail_action(info)
tell application "Mail"
set NewMail to |SelectedMessages| of info
repeat with CurrentMessage in NewMail
-- set is junk mail of CurrentMessage to true
-- set mailbox of CurrentMessage to mailbox "Junk"
set RawSource to source of CurrentMessage
set mysender to sender of CurrentMessage
set mysubject to subject of CurrentMessage
tell application "FileMaker Pro"
set newrec to create new record of database "Inbox.fp5"
--If your field names in Filemaker vary, you can edit them here.
set cell "Email Header" of newrec to RawSource
set cell "From" of newrec to mysender
set cell "Subject" of newrec to mysubject
end tell
end repeat
end tell
end perform_mail_action
(* This script was loosely based on the following scripts: *)
(* 1---SpamHolio v0.6-msk
Real Time Blackhole list lookups for E-Mails in your In Box for OS X
10.2/Mail
Applescript by David C. Chen, released under GPL, May 27, 2003 *)
(*2---This script was provided by Diana of VivaLaData -
http://www.vivaladata.com.
You're welcome to use it at your own risk, but please leave this
statement in tact.
The purpose of this script is to export messages from the inbox of
Outlook into Filemaker.*)
/Jonathan
On Thursday, October 2, 2003, at 01:02 AM, Joaqumn Lspez Cruces wrote:
I am trying to automate the reception of mail from FileMaker with
AppleScript, using Mac Os X Mail, but I've found no documentation at
all. It is possible to create an outgoing message quite easily, but
the hard part is trying to get data out of an incoming message. I
can't even find the way to refer to the incoming 'message' as such.
Please, can anybody offer any help?
_______________________________________________
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.
_______________________________________________
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.