Skip to main content

Name

post_read_smtp — This hook is invoked immediately following data that has been read from the remote server during an outbound SMTP connection.

Synopsis

#include "hooks/core/post_read_smtp.h"

| int **core_post_read_smtp** ( | closure, |   | |   | dc, |   | |   | len, |   | |   | expected, |   | |   | newstate, |   | |   | now, |   | |   | mask); |   |

void * <var class="pdparam">closure</var>; delivery_construct * <var class="pdparam">dc</var>; int <var class="pdparam">len</var>; int <var class="pdparam">expected</var>; int <var class="pdparam">newstate</var>; struct timeval * <var class="pdparam">now</var>; int * <var class="pdparam">mask</var>;

Description

This hook is invoked immediately following data that has been read from the remote server during an outbound SMTP connection. The hook is invoked prior to any error handling.

Parameters

closure

A pointer to the closure function.

dc

Stores all details regarding the current SMTP connection. For more information on this data structure see “delivery_construct”.

len

The length of the SMTP response string, in bytes.

expected

Represents the expected SMTP code.

newstate

Stores the new SMTP state machine state should the read complete and match the expected response code.

now

The current scheduler time.

mask

*mask stores the event mask that should be used to trigger the next read. Under most circumstances, values passed by reference should not be altered. Arguments that are passed by reference are done so to mirror the parent function's API.

Return Values

Returns a non-zero value on error.

Threading

This hook will be called in the Scheduler thread.

Was this page helpful?