Programming Microsoft Outlook and Microsoft Exchange, Second Edition (DV-MPS Programming)

Most people initially install and use Outlook because of its e-mail capabilities, and there is a good reason for this. Outlook provides a complete feature set for a standard e-mail user. As a developer, you will find that Outlook's built-in e-mail capabilities can enhance your Outlook applications. The next few sections describe some of these e-mail capabilities.

Automatic Name Resolution and Nickname Support

Many users do not remember the exact e-mail aliases of users in their organization or on the Internet, but they do remember either the first few letters of the alias or a nickname. To help users remember names quickly, Outlook supports both automatic name resolution and nickname support. With automatic name resolution, a user types in only the first few letters of an e-mail alias (for example, James St for James Stuart), and Outlook checks the user's address books to see whether any entry matches. (The order and number of address books searched are customizable by the user.) If more than one name contains letters that match the letters typed in, Outlook underlines the typed name with a red wavy line. The user can right-click on the name to bring up a list of matching names and select the desired name from the list. Figure 2-1 shows an example of this feature.

Figure 2-1 Nickname support in Outlook is automatically available to your applications.

If the user selects an individual from the list, Outlook remembers the set of typed characters as a nickname for that individual. Now whenever the user types in that letter combination, Outlook automatically converts the nickname to the full address of the originally selected individual. Outlook also underlines the user's address with a green dashed line to indicate that the address is a nickname. If the user wants to change the address of the nickname, all she has to do is right-click on the address and select a different user. The nickname features allow users to address messages quickly and easily.

When you develop custom e-mail applications in Outlook, your application will automatically use this address resolution and nickname functionality. You do not have to write code to resolve e-mail addresses in the directory. As you will see in Chapter 9, Outlook 2000 provides a way for you to program the name resolution event to customize this functionality.

Importance and Sensitivity Levels

Outlook allows users to set the importance and sensitivity of messages. Importance refers to the priority of a message, and three levels of importance can be assigned: low, normal, and high. Messages assigned low importance display a down arrow. Messages identified as high importance automatically display an exclamation point.

Sensitivity defines the personal nature of a message, and the setting typically dictates how other users can respond to the message. The values for sensitivity are normal, personal, private, and confidential. If a user sets the sensitivity of a message to private before sending it, recipients cannot edit the message text.

Outlook exposes both the importance and sensitivity properties so that you can take advantage of them in your applications. You can identify a specific message generated by your application as important or sensitive.

Delayed Delivery and Auto-Expire

Microsoft Outlook supports two features that control the delivery and availability of your messages: delayed delivery and auto-expire. Delayed delivery allows the user to specify a date and time when Outlook should deliver a message. Auto-expire allows the user to set the date and time a message becomes unavailable. Both delayed delivery and auto-expire are available by clicking the Options button in an Outlook message.

Outlook allows you to set these properties programmatically through the Outlook object library. This means that your application can delay or auto-expire the sending of messages based on the restrictions you or your users set in your application.

Message Attachments and Shortcuts

Users can embed documents, shortcuts to documents, and OLE objects in e-mail messages, a feature that allows users to share information easily with others. Figure 2-2 shows a message with different types of items embedded.

Figure 2-2 Since Outlook automatically supports OLE objects, your applications do as well.

As a developer, you can take advantage of Outlook's extensive, built-in support for attachments and objects by creating Microsoft Visual Basic Scripting Edition (VBScript) code that automates Outlook using the Outlook object library. You will see an example of how to create attachments programmatically in the Account Tracking application in Chapter 7.

Message Flags

Outlook provides message flags to help users identify important items in their Inbox folders and other folders. By setting a flag with custom text, a user can quickly scan his Inbox to see whether action items are pending for specific items. Outlook also supports the ability to set a reminder on the flag so that on the item's due date, a reminder pops up and plays a sound to remind the user about the item. Flagged items that are past their due dates automatically change colors in the Inbox.

Flags can also be used as friendly reminders to other users; an outgoing message can be flagged to inform a recipient that an item requires action by a specific date. Figure 2-3 shows an example of setting a message flag on an Outlook message.

Figure 2-3 Message flags can make information in your applications stand out.

You can modify message flags programmatically through the Outlook object library. This allows you to create applications that automatically flag messages and display reminders as well as track flagged items that have been marked by users as complete.

Voting Buttons

One use for e-mail is to gather opinions, though typically this involves manually keeping track of replies—that is, collating and counting them by hand. Outlook makes this process easier through voting buttons, a customizable feature that enables a user to send out, in a standard e-mail, a set of options requiring selection. Responses can be sent back to the user who created the voting buttons or to some other specified address. Outlook automatically collates the responses and builds a central tracking page so that the originating user can quickly see who voted, what they voted for, when they voted, and which option is the most popular. Figure 2-4 shows a voting button message that asks users what they think of the corporation's help desk services and the automatic tracking features.

Figure 2-4 Voting buttons are automatically tracked and collated for your applications.

Because Outlook exposes the voting button feature through its object library, you can take advantage of the automatic tracking and consolidation of voting buttons in your own applications. For example, you could create an Outlook application that takes quality polls every month by sending voting buttons to the participants. Outlook would automatically consolidate the survey responses, which you could view in the Outlook user interface or process programmatically. Chapter 13, which examines Microsoft Exchange Server Routing Objects, shows you how voting buttons are used when you develop workflow applications.

HTML Mail

Outlook integrates the power of Microsoft Internet Explorer, which allows users to send and receive entire web pages in e-mail. These web pages can contain images, custom functionality via scripting using VBScript or Microsoft JScript, and hyperlinks to other web pages. In addition, the web pages can contain the latest HTML enhancements such as dynamic HTML. Through this integration of HTML information, users can quickly share interesting web content with other users via an intranet or the Internet. Figure 2-5 shows an example of an e-mailed web page in Outlook 98.

Figure 2-5 An HTML-based message in Outlook.

Outlook also enables users to select HTML as their default message type when sending e-mail. This allows them to format their e-mail with more sophisticated content and customize it using Outlook's built-in, what-you-see-is-what-you-get HTML-style editing features, such as heading levels, background images, and numbered and bulleted lists. Outlook also supplies customizable stationery so that users can personalize standard HTML messages.

As a developer, you can extend Outlook's e-mail functionality beyond the sharing of web content. For example, you can build a web-based application that sends forms directly through e-mail. With such an application, users don't have to find the web server where the form resides, go to that web server in their web browser, and fill out the form. Instead users can fill out the web-based forms directly in Outlook and then submit their information to a web server by clicking a Submit button on the HTML form or by returning the completed HTML form through e-mail.

Querying for new-hire information is a great example of the way HTML e-mail can be used. You can create a web-based e-mail form that requests new hires to provide information that will enable setting up their phones, getting them on the payroll, and introducing them to the organization. The forms are automatically sent to new hires so that they don't have to search for them, and the "push" nature of e-mail encourages quick responses. After a user submits the completed form, a workflow process is started: the system sets up accounts for the payroll and phone departments, and a welcome message is sent to the entire organization with the specifics about the new user. Figure 2-6 shows an example of an HTML-based form that could be used in this situation. You will learn how to create similar types of web applications using Active Server Pages in Chapter 8.

Figure 2-6 An HTML message that contains a new employee questionnaire form.

Background and Scheduled Synchronization

Microsoft Outlook allows clients to synchronize local databases with the server's database. This allows the user to take server-based information offline—for example, on a laptop. This synchronization happens "in the background" so that a user can work on current items while new or changed items are synchronized from the server. Changes can be made to the offline copy of a database, and Outlook will automatically resynchronize those changes with the server. The user can set the schedule for resynchronization—for example, every 15 minutes when working online and every hour when working offline. Outlook dials the telephone automatically and synchronizes the folders, and when the synchronization is done, it disconnects.

These built-in synchronization features, which are available to your applications, allow users to replicate your Outlook forms so that they can make changes to your applications offline. When the users reconnect to the server, Outlook synchronizes their changes. You do not have to build any specific replication features into your applications.

Internet and Industry Standards Support

Outlook supports the major Internet and industry standards to guarantee that users have interoperability between Outlook and their messaging servers. These standards include Post Office Protocol version 3 (POP3) and Internet e-mail Access Protocol version 4 (IMAP4) for messaging functionality, Lightweight Directory Access Protocol (LDAP) for directory lookups, Network News Transfer Protocol (NNTP) through the Outlook Express client for accessing news articles, and Messaging Application Programming Interface (MAPI) for developing collaborative applications.

S/MIME Support

For secure e-mail communications, Outlook supports the Secure/Multipurpose Internet Mail Extensions (S/MIME) standard for digital signatures and encryption. S/MIME allows users to send messages they have digitally signed and encrypted to individuals who have S/MIME-compliant clients. In addition, users can receive and read secure e-mail in Outlook sent from S/MIME clients that are outside of their organization. This interoperability allows corporations to build secure communications with their business partners and customers no matter which client other groups are using.

Because Outlook supports the signing and encryption of custom applications through S/MIME, applications you base on the Outlook e-mail message automatically gain this functionality, not only for the form definition of your application but for all of its fields.

Категории