docs

Home All functions Categories

Purpose

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.

When to call it

Call this after a send has completed, for example:

Return values

These codes supplement the legacy return codes from vuSendMail*().

Notes:

Clarion prototype

  MODULE('vuMailKit.dll')
  vuMailLastReturnCode(),LONG,PROC,PASCAL,RAW,NAME('vuMailLastReturnCode')
  END

Example (Clarion)

  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