"I have a file containing 4000 pdf's," - if so, how do you separate pdf files from within the single file?
if not, how do associate each '.pdf' file with an e-Mail address, or other field of the FileMaker database?
What version of 'FileMaker' are you referring to?
What e-Mail application(s) are you (do you intend) using?
There are 'FileMaker' '
Automator' actions available, such as '
FileMaker Automator Actions' or the FileMaker Inc. 'Automator' actions via '
Database Publishing' [look in the 'FILEMAKER PRO ACTIONS' box, for the respective link]. You will have to mix and match various application actions to perform the overall process you desire.
Associating the obtained e-Mail addresses from a FileMaker database, to multiple e-Mail addresses (of 'Mail', 'Eudora', '
But then, there is AppleScript ...
Below is a 'quick and dirty' working example of how to obtain e-Mail addresses from a FM database, associate '.pdf' files (by their file names matching e-Mail addresses - obtained from a FM database), and to e-Mail the associated '.pdf' files - as attachments.
-- AppleScript Code begins here --
set DB_Path to "HD1:Users:bh:MyFirstFMDB.fp7" -- Full path to FM database file.
set PDF_Folder to "HD1:Users:bh:MyFirstFMDB_PDFs:" -- Path to PDF files.
set eMail_List to {} -- Create a list, to contain obtained e-Mail addresses.
tell application "Finder" to set pdf_LIst to every file of entire contents of folder PDF_Folder whose name extension is "pdf"
tell application "FileMaker Pro Advanced"
open file DB_Path -- Open desired FM database.
set tRecords to every record -- Obtain all records of current database.
end tell
repeat with i in tRecords -- Cycle throught the list of records, of current database.
copy (item 9 of i) to end of eMail_List -- In my 'quick and dirty' FM database, item 9 is the e-Mail Address field.
end repeat
tell application "Mail"
activate -- Optional.
repeat with i in eMail_List
set nMessage to make new outgoing message with properties {subject:"See attached PDF file", content:"Here is the promised '.pdf' file.", visible:false}
tell nMessage
make new to recipient at end of to recipients with properties {address:i}
tell content
repeat with j in pdf_LIst
tell application "Finder" to set file_Name to (name of j)
set file_Name to get (characters 1 through ((count file_Name) - 4) of file_Name) as string
if (i begins with file_Name) then make new attachment with properties {file name: (j as alias)} at after the last paragraph
end repeat
end tell
send
end tell
end repeat
end tell
-- AppleScript Code ends here --