You've Got the BizTalk POP3 Adapter
Email has become a ubiquitous part of every company's information technology infrastructure. Now, just about every software application provides some form of email support. Email was one of the first "killer apps," rivaled only by the word processor in its contribution to productivity.
The increased amount of email, though, led to a new productivity bottleneck. In particular, how does one manage the bewildering number of messages appearing in an inbox? Software to manage an inbox has led to new commercial opportunities. The deluge of email has given rise to tools for organizing, prioritizing, and filtering email messages. Some software even scans email arriving in a generic inbox and routes email to an appropriate individual.
Recently, my company developed a BizTalk solution for scanning and routing emailed integration result logs from hosted applications. In this article, I'm going to show you how we utilized the BizTalk Post Office Protocol version 3 (POP3) Adapter to inspect and route the incoming email messages.
Managing an Inbox
Integration log results we get from our Internet hosted apps must be reviewed daily for errors.
Most of the time, an integration process with one of these hosted applications is successful. Humans generally disdain and are not good at repetitive tasks. Reviewing a daily email of mostly successful integration logs is a repetitive task.
Although making a cursory scan of a log is hardly time consuming, a log is easy to dismiss, especially when a process is usually successful. Also, people take vacations and change jobs. Reviewing a mostly successful process generally gets forgotten in times of transition.
We could have assigned the job to our systems group, but here again you have the human factor to contend with. In addition, a business user is often better at assessing the impact of a failure.
Somehow, we needed to automatically check for error messages and notify a business user as soon as an error was found. At the same time, we needed to provide our business users with some means to manage the process. As you might imagine, there were a number of ways to attack this problem.
The Platform of Choice—BizTalk
Our firm supports two email systems, IBM Lotus Notes and Microsoft Exchange. We thought of writing a custom application triggered whenever an email message was received. We decided on BizTalk mainly because we wanted to take advantage of BizTalk's SharePoint integration and system workflow capabilities.
Rather than building a new Adapter or an Orchestration, we decided that a Custom Pipeline Component would be our best choice. Our solution resembled the figure below.
To implement the solution, we needed to add some additional information to the message's context and search a message's Stream object for a particular pattern. Because all operations occur when a message is received, we worked with the POP3 receive Adapter.
Configuring the POP3 Adapter
A complete introduction to the POP3 Adapter is beyond the scope of this article, so I'll focus on how we configured the POP3 Adapter for our solution. See the sources at the end of this article for more POP3 Adapter details.
Like other adapters, the POP3 Adapter translates data from a native format, MIME in this case, to an XML format palatable for any BizTalk application. As you can see below, relative to other BizTalk adapters, the POP3 Adapter has a small number of settings.
Page 1 of 2