Transport services, available as dynamic-link libraries (DLLs), allow a mail client to interact with a server to transmit or receive messages. The Windows CE mail transport service, Smtp.dll, is a message broker between Inbox, the Windows CE mail client, and an Internet mail server that is compliant with the Simple Mail Transfer Protocol (SMTP) and Post Office Protocol 3 (POP3) protocols. The operations of the mail transport service are transparent to the user.
Transport services are not limited to electronic mail. You can write a custom transport for paging, fax, file systems and other services. Similarly, you can write a custom client application. In any case, a transport is responsible for implementing a set of transport application programming interfaces (APIs) and making it available for a client to call. If you write a transport that uses Inbox as a client, you must declare and implement all the transport service interface functions and structures that Inbox expects. For lists of these functions and structures, see Lists of Functions and Interfaces.
Note You can use the mail message API to deliver messages to the mail client without server interaction, for example, for a built-in, one-way pager card. However, this chapter describes interactive transports only.
As part of initialization, the mail transport service retrieves from the registry information about the name of an SMTP or POP3 server, port, user name, password, return address, and so on. The transport service uses a private SERVICE structure to represent the server it communicates with and the MailMsg structure to transport mail messages between the client and the server.
A mail transport service works closely with a client application. For example, Inbox calls functions exported by Smtp.dll to perform standard mail operations, such as connecting and sending mail to an Internet mail server, and receiving and deleting mail from that server. A transport service must implement a minimum number of functions that the client application needs to call. Additionally, it may choose to implement a few optional functions. Before the client can communicate with a transport library, the transport must register itself in the registry and the client must add the transport to its list of interactive services.