You just need to call the RetrieveMessage function that returns the headers of each message and then look for the To: header. -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/ Ummm, why can't you give me a working code that grabs the headers and put it into a textarea? echo "<Form Action='pop_update.php' METHOD='POST' enctype='multipart/form-data'>"; echo "<textarea name='headers' cols='250' rows='5' value='",HtmlSpecialChars($headers[$line]),"'></textarea>'"; echo "<input name='headers' type='text' value='",HtmlSpecialChars($headers[$line]),"'>\n"; echo "<input name='submit' type='submit' value='submit'></form><br><br>"; Results in the form area being blank. Replacing 'HtmlSpecialChars' with 'RetrieveMessage' comes back with an error saying it's not deinfed on line blah.... (which results back to the form line) But having the first code results in no errors, but a blank box. But why does it work outside the box fine as plain text? All I need is the code that actually shows up into a textarea or a simple input text box. Code would be ideal as I can't figure this out ... I can get it to output fine in plain text but when I try a form it does nothing. Another way I tried which I can't remember what I did now returned an array response. I'm not worried about sifting through and finding the To: address. I know how to do this. I have the database setup to handle that. Just can't seem to get the headers in a form box, that's all I require than it's all done. Just a small bit of code is stopping sucess. otherwise I'll opt to another method of handling this, probably end up more complicated but I was told that this way would be pretty easy but can't seem to get you to show a working text area displaying the text. What I can't understand is why can't a simple bit of code show the same results in a text box than in plain text? Something is stopping it, but does not seem to be a error because no error is outputed. Unless some errors are not displayed? Anyways... I'm at the stage at throwing all the code in because of this problem. I've spent a week or so on it. I could of got a Mailing List and do it all that way and handle all bounces but thought I'd try a way that at least I could run it the way I want it to run that adapts to my database instead of using one all setup to run on a certain database structure which I'd have to work right through to edit to get to work with mine. Thanks to those people that have assisted me, please reply to this thread to this board though so everyone is aware of what you suggest etc. So than we don't get multiple ideas floating my way. All is appreicated. :) And thanks again, credit on the site I am working this with will be given to all sucessful help as I do on all my sites. Cheers! http://personals.yahoo.com.au - Yahoo! Personals New people, new possibilities. FREE for a limited time. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php