def getSMSProviderClass(packageName, className):
    """
    helper method to load the SMSProvider class from a given
    package in literal: checks, if the submittMessage method exists
    else an error is thrown

    example:
        getResolverClass("SkypeSMSProvider", "SMSProvider")()

    :return: the SMS provider object

    """
    mod = __import__(packageName, globals(), locals(), [className])
    klass = getattr(mod, className)
    if not hasattr(klass, 'submitMessage'):
        raise NameError(
            "SMSProvider AttributeError: %r.%r instance of SMSProvider has no method 'submitMessage'"
             % (packageName, className))
    else:
        return klass
