| Home | All functions | Legacy functions | Categories |
vuMailLastReturnCode() returns a numeric code that describes what happened in the most recent completed send or gated vuMailKit operation.
This is intended to be machine-readable, so calling code can react without parsing vuMailLastError() text.
Call this after a send has completed or after a gated vuMailKit function returns a negative licensing/setup code, for example:
These codes supplement the legacy return codes from vuSendMail*().
| Value | Meaning |
|---|---|
| 0 | No additional detail available, or success. |
| -451 | Conflicting .NET mail/runtime files were detected in the application folder. Clean up the app folder before troubleshooting license or mail-provider settings. |
| -9001 | vuMailKit licensing was not initialized. |
| -9002 | License string is invalid or initialization failed. |
| -9003 | Current license tier does not allow the requested feature. |
| -701 | OAuth needs re-authorization. The refresh token is invalid, expired, or revoked. |
| -702 | OAuth temporary failure. Retry later, such as a temporary network, provider, or throttling problem. |
| -711 | Provider or mail server could not be reached. |
| -712 | SMTP authentication or provider sign-in was rejected. |
| -713 | Provider rejected the message. |
Notes:
Prototype: vuMailLastReturnCode(), LONG, PROC, PASCAL, RAW, NAME(‘vuMailLastReturnCode’)
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)
ELSIF (LastRC = -711)
MESSAGE('The mail server could not be reached.|' & LastMsg,'vuMailKit',ICON:Exclamation)
ELSIF (LastRC = -712)
MESSAGE('The server rejected the sign-in.|' & LastMsg,'vuMailKit',ICON:Exclamation)
ELSIF (LastRC = -713)
MESSAGE('The server rejected the message.|' & LastMsg,'vuMailKit',ICON:Exclamation)
END
| Home | All functions | Legacy functions | Categories |