Qsmtp  0.30dev
Functions
client.h File Reference

definitions for SMTP client code to parse server replies More...

Go to the source code of this file.

Functions

void getrhost (const struct ips *m, const unsigned short idx)
 print remote host information to buffer More...
 
int checkreply (const char *status, const char **pre, const int mask)
 

Detailed Description

definitions for SMTP client code to parse server replies

Function Documentation

int checkreply ( const char *  status,
const char **  pre,
const int  mask 
)

check the reply of the server

Parameters
statusstatus codes to print or NULL if not to
pretext to write to stdout before server reply if mask matches
maskbitmask for pre: 1: 2xx, 2: 4xx, 4: 5xx
Returns
the SMTP result code

status must be at least 3 bytes long but only the first 3 will have any effect. The first one is the status code writen on success (server response is 2xx), the second on on temporary error (4xx) and the third on permanent error (5xx). If no status code should be written status must be set to NULL. If the first character in status is ' ' no message will be printed for success messages.

void getrhost ( const struct ips m,
const unsigned short  idx 
)

print remote host information to buffer

Parameters
mthe currently active MX entry
sindex of the currently active IP address