I've been stucked with this prob for 2 weeks so any help would be much appreciated!
What I'm doing is piping all emails incoming to a script. The script will parse the headers and determine who, the email is intended "for." After it parses, it inserts the info into a SQL table to be retrieved later.
I have it parsing the TO: headers fine, but since BCC based emails will obscure who the intended recipient is, the only way I can see is parse the RECIEVED: header. So what I'm trying todo is get the email, jchum@jps.net from an example line such as this:
Received: from hotmail.com (f119.law8.hotmail.com [216.33.241.119])
by ns.mycool.com (8.11.4/8.11.4) with ESMTP id f632XYa33041
for <jchum@blazeboard.com>; Mon, 2 Jul 2001 22:33:34 -0400 (EDT)
How would I go about doing this? Thanks in advance.