Caution: this is old EurekaLog 6 documentation. This is not the latest version.
EurekaLog includes a function named GetLastEurekaLogErrorMsg, that enables you to obtain the last internal EurekaLog error message.
Syntax of this function is as follows:
function GetLastEurekaLogErrorMsg: string;
You should use this function in the EurekaLog ExceptionActionNotify event to check if for errors in the email sending procedure (or other).
Example:
uses ExceptionLog, ECore, ETypes; // The required units...
procedure MyActionNotify(EurekaExceptionRecord: TEurekaExceptionRecord; EurekaAction: TEurekaActionType; var Execute: Boolean); begin if (EurekaAction = atSentEmail) and (GetLastEurekaLogErrorCode in [eeEmailMAPIError, eeEmailShellError, eeEmailSMTPError]) then begin MessageBox(0,PChar(GetLastEurekaLogErrorMsg), 'Email error', MB_OK or MB_ICONERROR); end; end;
|