MailError

The MailError function retrieves the error condition set by the last called mail function.

Syntax

int MailError (HANDLE hMail);

At a Glance

Header file: Msgstore.h
Platforms: H/PC
Versions: 1.0 and later

Parameters

hMail
Handle to the mail context. This handle is created by the MailOpen function.

Return Values

This function returns the value of the last error code as an integer.

Remarks

Each call to a mail function sets an error code. The MailError function retrieves the code and returns it as an integer. Negative values indicate warnings, positive values indicate errors, and zero indicates MailError completed successfully. To ensure the correct error value is captured, call MailError immediately after the transport function call.

For more information, see Inbox.

See Also

MailErrorMsg