version 6.5
SMTP_New (smtp_ID) Integer
Parameter | Type | Description | |
smtp_ID | Longint | Reference to this new message | |
Function result | Integer | Error Code |
Description
The SMTP_New command should be the first command called in any sequence that is going to build a SMTP mail message except where SMTP_QuickSend is being used. SMTP_New creates a new message in memory and returns a reference to the message in the smtp_ID long integer variable. Subsequent SMTP commands will use the smtp_ID reference to populate the message with header and body information prior to calling SMTP_Send.
Every call to SMTP_New should have a corresponding call to SMTP_Clear. After sending a message, the call to SMTP_Clear will free any memory held by the contents of the message.
smtp_ID is the long integer reference to the message just created. This ID will be used for all subsequent references to this message. It is possible to open multiple new messages and the smtp_ID returned for each provides a means of identifying which open message any subsequent command should be applied to.
Examples
See the examples for the command SMTP_Body and SMTP_Send.
See Also
SMTP_Clear, SMTP_QuickSend, SMTP_Send.