Skip to main content

Name

read_smtp2 — Read the SMTP response from peer

Synopsis

#include "smtp.h"

| int **read_smtp2** ( | dc, |   | |   | expected_code, |   | |   | now, |   | |   | mask, |   | |   | extra_codes); |   |

delivery_construct * <var class="pdparam">dc</var>; int <var class="pdparam">expected_code</var>; struct timeval * <var class="pdparam">now</var>; int * <var class="pdparam">mask</var>; int <var class="pdparam">extra_codes</var>;

Description

**Configuration Change. ** This feature is available starting from Momentum 3.1.0.

Read the SMTP response from peer.

This function is the same as read_smtp except that it takes extra SMTP codes besides expected_code.

Parameters

dc

The delivery construct. For a description of this data type see “delivery_construct”.

expected_code

The expected SMTP response code from peer.

now

The current time.

mask

The IO mask such as E_READ.

extra_codes

list of SMTP codes in addition to the expected_code. Use a value <= 0 to terminate the list.

Return Values

On success this function returns a value greater than 0 and on failure a number less than 0.

Threading

It is legal to call this function in any thread.

See Also

Was this page helpful?