protected function get_defaultexpiration_text(\core\message\inbound\handler $handler) {
        switch($handler->defaultexpiration) {
            case HOURSECS :
                    return get_string('onehour', 'tool_messageinbound');
            case DAYSECS :
                    return get_string('oneday', 'tool_messageinbound');
            case WEEKSECS :
                    return get_string('oneweek', 'tool_messageinbound');
            case YEARSECS :
                    return get_string('oneyear', 'tool_messageinbound');
            case 0:
                    return get_string('noexpiry', 'tool_messageinbound');
            default:
                    return ''; // Should never happen.
        }
    }