new method getLibraries() in Addons.php; extended Mail.php for better error handling