|
|
NNTPSTREAM *nntp_open(char **hostlist, long debug);
This function opens an NNTP connection to a one of the hosts in the host list and if successful returns a stream suitable for use by the other MTP functions. The hosts are tried in order until a connection is successfully opened. If debug is non-NIL, protocol telemetry is logged via mm_dlog. NIL is returned if this function fails to open a connection to any of the hosts in the list.
void nntp_close(NNTPSTREAM *stream);
This function closes the NNTP stream and frees all resources associated with it that it may have created.
long nntp_mail(NNTPSTREAM *stream, ENVELOPE *msg, BODY *body);
This function negotiates an NNTP posting transaction to
deliver the specified news message. This function returns
T if success or NIL if there is any failure.
The text reason for the failure is in stream->reply
item; if it is associated with a recipient it is also in that
address's address->error
item.