User guide
21
functions, two of the parameters are pointers to functions for printing the status and error
message. These functions are platform dependent.
typedef void (*StatusCallbackFunc)(char *status);
typedef void (*ErrorCallbackFunc)(char *problem, char
*extraInfo);
int sendmail(char *smtpHost, char *from, char *to, char
*subject, char *data, StatusCallbackFunc statusFunc,
ErrorCallbackFunc errorFunc)
/* Sends e-mail to a user by connecting to the STMP server smtpHost. From, to and
subject are self-explanatory. data is the body of the message. statusFunc and
errorFunc are explained above. */
int senddata(char *Host, char *port, struct pair data[], int
N, StatusCallbackFunc statusFunc, ErrorCallbackFunc
errorFunc);
/* Sends N elements of data to a server at Host and port. */