This provider demonstrates the ability to accept both mandatory and optional parameters from the caller as well as exception handling in the provider. This provider still only has one method (Send Mail) but it accepts optional parameters allowing for authentication against the SMTP server and basic customizations of the message, like 'priority'.
In order to use this sample provider to test XML requests and responses, you must have an SMTP server must be available.
To register the Send SMTP Provider Sample in Visual Studio 2005
You can open up Provisioning Manager and import this namespace, or go to a command prompt, navigate to <local root directory>:Program Files\Microsoft Hosting\Development\Samples\VBNet\2.0\SendMail and use the 'provnamespace' command to register the namespace with MPS with the following command: Provnamespace SendMail_ns.xml
To register the Send SMTP Provider Sample in Visual Studio 2005 using MPS SDK add-in features
The MPS Output window should indicate that the namespace was registered successfully. A new namespace beginning with the letters "SDK" should now show up in the Provisioning Manager, and refreshing the Namespace Browser window in Visual Studio should yield the same result.
Now a request can be submitted from the command line in order to test the provider. Create a sample request, similar to the following:
Submit the request to MPS, and the response from MPS should be similar to the following sample:
A test can also be run from within Visual Studio 2005 by opening the MPS Development Tools.
To test the Send SMTP Sample Provider within Visual Studio 2005