Jump to content
xisto Community
Sign in to follow this  
xJedix

Segment Finder?

Recommended Posts

Hi, I was wondering if there is a way to grab a part of a message and put it into a variable.

For example, if I have this e-mail message /w all headers and extras included, I want to just grab the actual message out of it.

From MAILER-DAEMON Sat Dec 17 04:41:28 2005Date: 17 Dec 2005 04:41:28 +0000From: Mail System Internal Data Subject: DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATAMessage-ID: <1134794488@gamma.xisto.com>X-IMAP: 1134603532 0000000079Status: ROThis text is part of the internal format of your mail folder, and is nota real message.  It is created automatically by the mail system software.If deleted, important folder data will be lost, and it will be re-createdwith the data reset to initial values.From xjedix@sf.trap17.com Sat Dec 17 04:41:28 2005Return-path: Envelope-to: xjedix@gamma.xisto.comDelivery-date: Sat, 17 Dec 2005 04:41:28 +0000Received: from xjedix by gamma.xisto.com with local-bsmtp (Exim 4.52)	id 1EnTsu-00049w-Dj	for xjedix@gamma.xisto.com; Sat, 17 Dec 2005 04:41:28 +0000X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on gamma.xisto.comX-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=NO_REAL_NAME,NO_RELAYS 	autolearn=no version=3.1.0Received: from xjedix by gamma.xisto.com with local (Exim 4.52)	id 1EnTsu-00049p-8U	for xjedix@sf.trap17.com; Sat, 17 Dec 2005 04:41:28 +0000Received: from 64.212.140.5 ([64.212.140.5])        (SquirrelMail authenticated user xjedix)        by http://forums.xisto.com/no_longer_exists/ with HTTP;        Sat, 17 Dec 2005 04:41:28 -0000 (UTC)Message-ID: <4370.64.212.140.5.1134794488.squirrel@freehost.xisto.com/r/h/www.sf.trap17.com;Date: Sat, 17 Dec 2005 04:41:28 -0000 (UTC)Subject: testFrom: xjedix@sf.trap17.comTo: xjedix@sf.trap17.comUser-Agent: SquirrelMail/1.4.4MIME-Version: 1.0Content-Type: text/plain;charset=iso-8859-1Content-Transfer-Encoding: 8bitX-Priority: 3 (Normal)Importance: NormalStatus: OX-Status: X-Keywords:                  X-UID: 79lalalalal test....tetstYay!

I want the message:
alalalal test....tetstYay!

to be inserted into a variable so I can insert it into a sql database. How could I go about doing this? I have been looking at some different php functions but I'm not sure exactly I would go about doing this.

Any help would be greatly appreciated,

Thanks, xJedix

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.