Re: Read email contents and enter into database

2009-03-18 Thread Jason Congerton
Hi All Thank you for all of your responses, i will post back with my results. (Thanks for the code tony) Jason ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://a

Re: Read email contents and enter into database

2009-03-17 Thread Tony Bentley
Here you go: SELECT * FROM inbox where uid = '#tmail.uid#' INSERT INTO inbox ( uid, messageID, from_name, to_name, cc_name, subject, body, textbody, htmlbody, at

Re: Read email contents and enter into database

2009-03-17 Thread Jason Fisher
As Brad notes, messageid is your best bet for uniqueness ... messagenumber is a query column, too, but it changes per request (recalculated based on what's in the folder on the server). If you need a unique value in the DB, I would go with messageid rather than subject, but it sounds like you'

Re: Read email contents and enter into database

2009-03-17 Thread Brad Wood
e the items. ~Brad - Original Message - From: "Jason Congerton" To: "cf-talk" Sent: Tuesday, March 17, 2009 11:45 AM Subject: Read email contents and enter into database > > Hi > > I have had look via google and found no answers, has anybody ever neede

Re: Read email contents and enter into database

2009-03-17 Thread Michael Dinowitz
cfpop returns a query object which can be looped through to get each email, which is contained within a single row. Do a test on the email and look at body, textbody, and htmlbody to see which you want. Once you know what you want to send to the DB, just loop over the query and run a cfquery to in

Read email contents and enter into database

2009-03-17 Thread Jason Congerton
Hi I have had look via google and found no answers, has anybody ever needed to read the contents of an email and enter them into a database. The subject line will contain a unique identifier and emails will be fired into a single account. I need to get the body contents and enter them into a