January 10, 200323 yr Newbies Here's the problem: On my web site, I have a PHP form which the user fills in, then clicks a button to "Submit." The data is returned to me as an email, and looks something like this (after the header is removed): <sample data starts below> realname: John Lincoln nationality: USA email: [email protected] computer: Mac </end of sample data> So, the data arrives as an email in this format: (category)(colon)(space)(data)(carriage return)(carriage return) (category)(colon)(space)(data)(carriage return)(carriage return) (category)(colon)(space)(data)(carriage return)(carriage return) etc. Rather than collect a series of individual emails with text data like this, I want to input the data into a FileMaker database, where I can count, measure, and manage it, based on all of the given categories. Here's how far I've gotten: 1. I can open each individual email and COPY the sectioning containing the data (formatted as above). 2. I can PASTE the selection into a new text file, then SAVE it. 3. I can design a blank FileMaker database with all of the appropriate categories. 4. But here's where my problem appears. How can I IMPORT the field data from the text file into a new record in the FM database? 5. As an interim step, I can OPEN the text file in MS Excel
January 10, 200323 yr Well, for a plugin, you could look at POP3it by www.cnsplug-ins.com this allows you to bring emails straight into FileMaker Pro. You would want the address to be one that only filemaker looks at. Its a start. Otherwise, you would want to look at ways of parsing the information from a single field into your actual FileMaker fields. HTH
January 13, 200322 yr If the email is coming to you from a form it should be fairly easy to parse out the info into the appropriate fields in your FMP solution. I did something similar to sort out messages from a FM forum that sends out posts to the board in a daily email. I just copy the email and post it into a global field, then run my script. The script creates a new record, strips out the date,time,subject,user,subject for each of the individual posts within the email.
January 13, 200322 yr This previous post sounds like what you are looking for. It even has an example file. Click the link below to see the post: Previous Post.
January 13, 200322 yr Since you are a mac user, you can use applescript extract your data. I recommend the book AppleScript for the Internet. It gives a number of examples using different email clients to parse email data. Here is a script I just found at the macscripter script builder archive. It is from Diana Cassady and is copied below in its entirety, [The line breaks are not coming across, I apologize. Please see attachment.] (*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. I run this script with with inbox as the front most mailbox. Your target database must also be the front most database. The field names I'm using are message, from, subject, and date_sent. They're all text fields. You can alter them below if necessary. I'm using Outlook Express 5.02 and Filemaker 5, but it should work with other versions of Filemaker and probably other versions of Outlook as well.*) tell application "Outlook Express" set totalmessages to count messages of folder 1 repeat with x from 1 to totalmessages set mymessage to content of message x of folder 1 set mysender to sender of message x of folder 1 set senderaddress to address of mysender set sendername to display name of mysender set myfrom to sendername & " <" & senderaddress & ">" as string set mysubject to subject of message x of folder 1 set mydate to time received of message x of folder 1 as string tell application "FileMaker Pro" set newrec to create new record of database 1 --If your field names in Filemaker vary, you can edit them here. set cell "message" of newrec to mymessage set cell "from" of newrec to myfrom set cell "subject" of newrec to mysubject set cell "date_sent" of newrec to mydate end tell end repeat end tell
Create an account or sign in to comment