ClearMail
Clear the memory that was allocated for sending the mail.
ClearMail(
)
Return Values
Value | Description |
---|---|
0 | Operation succeeded. |
-18 | Memory allocation error. |
<0 | An error occurred |
Description
When sending email, Uniface maintains the complete message structure, including header information, message body, attachments, inline objects in memory, and information retrieved via GetRecipientDetails. To clear this memory, call the ClearMail operation or delete the UPOPMAIL component instance, which implicitly clears the memory.
variables handle mailApiHandle endvariables ; create the instance handle newinstance "UPOPMAIL", mailApiHandle <snip>log on to server, set message header and content, send mail, then log off mail server </snip> ; clear the mail message structure mailApiHandle->ClearMail()