i searched the source code of all the pages and couldn't find ini_set
The function ini_set will set the value you provide for the directive you specified, until the script ends.
See: http://ca.php.net/ini_set
You should check the 'SMTP' and 'smtp_port' directives because you seem to be unable to connect to your server using "localhost" on port 25. Contact your webhoster to find out the correct SMTP host & port.
See: http://ca.php.net/manual/en/ini.php#ini.list
Thanks, Mike