SmtpAddRecipient Function  
 
INT WINAPI SmtpAddRecipient(
  HCLIENT hClient,  
  LPCTSTR lpszAddress  
);

The SmtpAddRecipient function adds the specified address to the recipient list for the current message. This function should be called once for each recipient.

Parameters

hClient
Handle to the client session.
lpszAddress
Points to a null-terminated string which specifies the address to be added to the recipient list.

Return Value

If the function succeeds, the return value is the server result code. If the function fails, the return value is SMTP_ERROR. To get extended error information, call SmtpGetLastError.

Requirements

Client: Requires Windows 7, Windows Vista or Windows XP.
Server: Requires Windows Server 2008 or Windows Server 2003.
Header: Include cstools7.h.
Library: Use csmtpav7.lib.
Unicode: Implemented as Unicode and ANSI versions.

See Also

SmtpCloseMessage, SmtpCreateMessage, SmtpExpandAddress, SmtpVerifyAddress