| Home | All functions | Categories |
vuMailLastReturnCode() returns a numeric code that describes what happened in the most recent completed send operation.
This is intended to be machine-readable, so calling code can react without parsing vuMailLastError() text.
Call this after a send has completed, for example:
These codes supplement the legacy return codes from vuSendMail*().
Notes:
MODULE('vuMailKit.dll')
vuMailLastReturnCode(),LONG,PROC,PASCAL,RAW,NAME('vuMailLastReturnCode')
END
WaitRC LONG
LastRC LONG
LastMsg CSTRING(2048)
WaitRC = vuSendMailWait(cFrom,cTo,cCC,cBCC,cSubject,cBody,cAttach)
LastRC = vuMailLastReturnCode()
LastMsg = vuMailLastError()
IF (LastRC = -701)
MESSAGE('OAuth needs re-authorization.|' & LastMsg,'vuMailKit',ICON:Exclamation)
ELSIF (LastRC = -702)
MESSAGE('Temporary OAuth failure.|' & LastMsg,'vuMailKit',ICON:Exclamation)
END