-if (!empty($errorCode)) {
- // @TODO Rewrite this to a dynamic include or so
- switch (getConfig('mailid_error_redirect')) {
- case 'INDEX': // Redirect to index page
- redirectToUrl('modules.php?module=index&code=' . $errorCode . '&ext=mailid');
- break;
-
- case 'REJECT': // Redirect to rejection page
- if (isExtensionActive('other')) {
- // Redirect to configured URL
- redirectToConfiguredUrl('reject_url');
- } else {
- // Redirect to index
- redirectToUrl('modules.php?module=index');
- }
- break;
-
- default:
- logDebugMessage(__FILE__, __LINE__, sprintf("Unknown status %s detected in mailid_error_redirect.", getConfig('mailid_error_redirect')));
- redirectToUrl('modules.php?module=index&code=' . getCode('UNKNOWN_STATUS') . '&ext=mailid');
- break;
- } // END - switch
-} // END - if