I have done some searching into this issue and I think I might have found out the problem. It looks like the first parameter you are passing into the WAUE_Definition is not correct. The first parameter in this function call should be the path to the PEAR object, instead you are passing it the server value.
It should look something like this:
WAUE_Definition("C:\\php\\PEAR\\","".($WAGLOBAL_Email_Server) ."","25","xxxxxxxx","xxxxxxxxx","True","","","","" );
Please update this and test it out, let us know if it does not resolve the problem. You will need to remove the debug code that you added to the file.