Example #1
0
        "Subject": "Created Using the PythonSDK",
        "HTMLBody": "<b>Some HTML Goes here</b>"
    }
    email.createOptions = createOptions
    results = email.post()
    print 'Post Status: ' + str(results.status)
    print 'Code: ' + str(results.code)
    print 'Message: ' + str(results.message)
    print 'Result Count: ' + str(len(results.results))
    print 'Results: ' + str(results.results)

    # Asynchronous Soap request to update Email, Patch method
    #######################################################

    # Explicitly passing the parameter, RequestType & QueuePriority
    updateOptions = ET_UpdateOptions(RequestType, QueuePriority)
    updateOptions.auth_stub = myClient
    email = ET_Email()
    email.auth_stub = myClient
    email.props = {
        "CustomerKey": NameOfTestEmail,
        "Name": NameOfTestEmail,
        "Subject": "Created Using the PythonSDK",
        "HTMLBody": "<b>Some UPDATED HTML Goes here</b>"
    }
    email.updateOptions = updateOptions
    results = email.patch()
    print 'Patch Status: ' + str(results.status)
    print 'Code: ' + str(results.code)
    print 'Message: ' + str(results.message)
    print 'Result Count: ' + str(len(results.results))