CPopClient::SendMessage Method  
 
INT SendMessage(
  LPCTSTR lpszMessage,  
  INT nLength  
);

The SendMessage method sends a message to the specified recipients.

Parameters

lpszMessage
Pointer to a string buffer which contains the message to be submitted to the mail server for delivery.
nLength
The length of the string buffer. This specifies the number of characters to be written to the mail server. This value must be greater than zero. If this value is -1, then the length of the string up to the terminating null character is used.

Return Value

If the method succeeds, the return value is zero. If the method fails, the return value is POP_ERROR. To get extended error information, call GetLastError.

Remarks

The SendMessage method sends a message through the POP3 server using the XTND XMIT command. The specified file must be in the standard format as described in RFC 822, with the recipient addresses specified in the To: and Cc: header fields. Some servers may support blind carbon copies by using addresses specified in a Bcc: header field, and then removing those addresses from the header before delivering the message.

Note that not all POP3 servers support this command, and it is recommended that you use the Simple Mail Transfer Protocol (SMTP) for general mail delivery purposes.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: cspopv12.lib
Unicode: Implemented as Unicode and ANSI versions

See Also