This function sends a message—in the form of a MailMsg structure—using the transmit server.
At a Glance
Header file: | Smtp.h |
Windows CE versions: | 1.0 and later |
Syntax
BOOL TransportSend(HANDLE hService, MailMsg *MsgPtr);
Parameters
hService
[in] Handle to a SERVICE structure.
MsgPtr
[in] Pointer to a MailMsg structure that contains the message to be sent.
Return Values
TRUE indicates success. FALSE indicates failure. To get extended error information, call TransportError or TransportErrorMsg.
Remarks
The transport service provider must implement the TransportSend function in a DLL registered as a mail service. The Inbox application can then load this DLL and call this function.
Because the sample transport service interfaces with the file system, the sample TransportSend involves creating and writing to a file (using CreateFile and WriteFile) that is located in the inbox. The MsgPtr structure contains the message header, body, and information that may be written to the file. In the sample SERVICE structure, the directory path serving as the inbox location is defined in the szMailDir member.
In order to display the progress status of the message transfer, the sample TransportSend routine also utilizes the CallBack routine that was passed to the TransportConnect function.
The sample service writes to the file system. If, for example, the service was for electronic mail, this routine would transfer the message using the transmit server for this service.
See Also