One of your comments suggest you're using a relative path:
../web-app/app/libraries/phpmailer/class.phpmailer.php
^^
That's generally unreliable in the PHP universe but in this particular case:
Working directory of the script can change inside the shutdown function under some web servers, e.g. Apache.
If the error message doesn't display the full path, you can at least print current directory yourself for debugging purposes:
var_dump(getcwd());