The SmtpSendMessage function is used to send the contents
of a memory buffer, file or the system clipboard to the specified
recipients. The message must be in the standard format as described
in RFC 822.
This protocol is only concerned with the delivery of a message
and not its contents. Header fields in the message are not parsed
to determine the recipients. This recipient parameter should be a
concatenation of all recipients, including carbon copies and blind
carbon copies, with each address separated with a comma.
This function will cause the current thread to block until the
complete message has been delivered, a timeout occurs or the
operation is canceled. During the transfer, the SMTP_EVENT_PROGRESS
event will be periodically fired, enabling the application to
update any user interface controls. Event notification must be
enabled, either by calling SmtpEnableEvents, or by
registering a callback function using the SmtpRegisterEvent
function.
To determine the current status of the transaction while it is
in progress, use the SmtpGetTransferStatus function.