Errors
Errors¶
Thread safe “errno” for libESMTP.
- 
int smtp_errno(void)¶
- Get error number. 
Parameters
- void
- no arguments 
Description
Retrieve the error code for the most recently failed API in the calling thread.
Return
libESMTP error code.
- 
char *smtp_strerror(int error, char buf[], size_t buflen)¶
- Translate error number to text. 
Parameters
- int error
- Error number to translate 
- char buf[]
- Buffer to receive text 
- size_t buflen
- Buffer length 
Description
Translate a libESMTP error number to a string suitable for use in an application error message. The resuting string is copied into buf.
Return
A pointer to buf on success or NULL on failure.