I can't work out how to load the text from a recordset result into a variable for sending using mail in a script. I have a script which creates a dynamic table then I want to load the table's HTML into a variable which will be echoed in the mail function. I can't work out how to do this. I've tried calling the file using exec and fopen but I don't get any result. I have googled and RTFM (especially variable scope) but just can't work out how to do it. Any help would be greatly appreciated. PS - I know there are many Mail classes out there, but I also realise that this is something I will want to know how to do at a later time. Thanks, Tom