Jonas Follesø profile picture

Jonas Follesø

Software Developer

Free SMS from Outlook using Outlook 2007 Mobile Services

May 1st 2007

One of the cool, but perhaps overlooked features, of Outlook 2007 is the integration of mobile messaging. Today many mobile providers offers some kind of plug-in to Outlook enabling their customers to send SMS messages from Outlook. The implementation and user experience differs for each mobile provider. In Outlook 2007 there is a standard way to supports incoming and outgoing SMS and MMS messages directly from Outlook. You simply implement an XML Web Service consisting of three simple methods. There really isn't too much information available on Outlook Mobile Services in the blog sphere, so hopefully this post and webcast will be a welcome addition. In this post you'll learn how to create a Outlook 2007 Mobile Service. I've also created a screen cast that walks you through the development and deployment process.

This post is the third in a series covering free SMS messages using the Ung1881 service. The first post covered how to wrap the service into a .NET library, while the second covered how to use the .NET library from a Vista Sidebar Gadget. In this post I'm going to discuss how to implement an Outlook 2007 Mobile Service that use the same library to send free SMS messages from Outlook 2007!

Using the Ung1881 Free SMS library and Outlook 2007 Mobile Services you can send free SMS messages directly from Outlook 2007

Your Web Service only need to implement three methods, GetServiceInfo, GetUserInfo and SendXms. I've included a simple class diagram showing the methods you need to implement.

The strings passed back and fourth between server and client contains XML data. The XML structure, and Outlook 2007 Mobile Services in general, is well documented in a comprehensive developer guide up on MSDN. Last week I did some e-mailing with the team behind Outlook 2007 Mobile Services, because I couldn't get it to work by following the code samples up on MSDN. I turned out the samples where written for 1.1, and that the SOAP encoder works a little bit different in .NET 2.0. The problem was that Outlook called the service, but the parameters where always null. In the samples they use SoapRpcMethodAttribute on all methods, instead of traditional SOAP message style. But you can just overlook all the attributes and just use the WebMethod attribute as usual. The entire code of the service is fairly short (less than 200 lines) and is included below.

Once you have your service up and running you can add a new account in Outlook 2007. In the add account wizard, select "other" and "Outlook Mobile Service" as the account type. This will bring up the "Outlook Mobile Service Account" dialog. Here you enter the URL to the service and your user credentials.

 

Once you've created an Outlook Mobile Service account you get a new item in the "New" menu called "New Text Message". This brings up the new message dialog. When you send your message, Outlook will call your service and the SendXms method.

The installation process isn't as easy as I wish it was, since this is a server application you need to configure IIS. Outlook will only connect to HTTPS sites, so you need to create your own certificate as well. The screen cast walks you through this process. Scott Guthrie has a nice post on IIS7 and self signed certificates over at his blog

The next post in this Free SMS series will be an .NET 3.0 application for Windows XP users who don't have the Vista Sidebar available. Stay tuned! Please drop me a comment if you downloaded and installed the service and found it useful, or have any questions regarding Outlook 2007 Mobile Services.
 

blog comments powered by Disqus