diff --git a/config-templates/config.php b/config-templates/config.php
index ca7f2e4631a0ce375d9a6426ec96ae13d296e24d..66d1cf49e520959a3c9b754d1a18eb90b2fdb23a 100644
--- a/config-templates/config.php
+++ b/config-templates/config.php
@@ -46,8 +46,15 @@ $config = array (
 	 */
 	'debug' => FALSE,
 
-
+	/*
+	 * When showerrors is enabled, all error messages and stack traces will be output
+	 * to the browser.
+	 *
+	 * When errorreporting is enabled, a form will be presented for the user to report
+	 * the error to technicalcontact_email.
+	 */
 	'showerrors'            =>	TRUE,
+	'errorreporting'		=>	TRUE,
 
 	/**
 	 * Custom error show function called from SimpleSAML_Error_Error::show.
diff --git a/lib/SimpleSAML/Error/Error.php b/lib/SimpleSAML/Error/Error.php
index 86de994b0e93e5185b9a802ea98e760295c16ace..ff1870863c398b5b8911e206ec4d6e7b07cdeeac 100644
--- a/lib/SimpleSAML/Error/Error.php
+++ b/lib/SimpleSAML/Error/Error.php
@@ -263,7 +263,8 @@ class SimpleSAML_Error_Error extends SimpleSAML_Error_Exception {
 		$data['includeTemplate'] = $this->includeTemplate;
 
 		/* Check if there is a valid technical contact email address. */
-		if($config->getString('technicalcontact_email', 'na@example.org') !== 'na@example.org') {
+		if($config->getBoolean('errorreporting', TRUE) &&
+			$config->getString('technicalcontact_email', 'na@example.org') !== 'na@example.org') {
 			/* Enable error reporting. */
 			$baseurl = SimpleSAML_Utilities::getBaseURL();
 			$data['errorReportAddress'] = $baseurl . 'errorreport.php';
diff --git a/www/errorreport.php b/www/errorreport.php
index 8d98f0e82dc6de287796534c6969f2499184e7f7..101eae951cb6b5f0c8d6c56b7b7f8deb69944943 100644
--- a/www/errorreport.php
+++ b/www/errorreport.php
@@ -91,7 +91,7 @@ if (!preg_match('/\s/', $email) && strpos($email, '@') !== FALSE) {
 
 /* Send the email. */
 $toAddress = $config->getString('technicalcontact_email', 'na@example.org');
-if ($toAddress !== 'na@example.org') {
+if ($config->getBoolean('errorreporting', TRUE) && $toAddress !== 'na@example.org') {
 	$email = new SimpleSAML_XHTML_EMail($toAddress, 'simpleSAMLphp error report', $from);
 	$email->setBody($message);
 	$email->send();