[eluser]TheFuzzy0ne[/eluser]
DB.php is not actually a class, it's a function, so you won't be extending it, you'll be replacing it completely, but obviously, you won't be touching the core files. You'll just override the database() method in the Loader class with one that tells it to look in your libraries directory DB.php, where it will load your customised version which will have the code to send you Emails. However, whilst you should be able to load the Email class, you may not be able to. If that's the case, you might have to go the traditional route for sending an Email to yourself. You could add a function to DB.php and call it something like _email_db_error(), to avoid any name clashes with any future helpers.