public static function getMailerClassName($className)
    {
        if (class_exists($className)) {
            return $className;
        }

        // replace underscores with namespace marker, PSR-0 style
        $fullyQualified = '\\Omnimail\\' . str_replace('_', '\\', $className);
        if (!class_exists($fullyQualified)) {
            $fullyQualified = $fullyQualified . '\\Mailer';
            if (!class_exists($fullyQualified)) {
                throw new \Exception("Class '${className}' not found");
            }
        }

        return $fullyQualified;
    }