You can use the Development Environment module for this. Some more details about it (from the project page):
When developing Drupal sites, we are often working in a development environment in which we want behaviors different than we would like on a production environment. An example of this is sending emails - it's often preferable to not send emails from a development environment, as they can end up in our client's email boxes. This is particularly true when there is a production (live) version of the site on the web, as users may receive emails from your development environment, which will be both confusing, and any links to the site within the emails will be unusable by anyone without access to that development environment.
This module aims to provide various settings which are specific to development environments only.
Disclosure: I developed this module.