Skip to main content

Name

esmtp_extensions_register — Register ESMTP extensions

Synopsis

#include "esmtp_factory.h"

| void **esmtp_extensions_register** ( | command, |   | |   | s, |   | |   | f, |   | |   | closure); |   |

const char * <var class="pdparam">command</var>; ESMTPExtensionSetup <var class="pdparam">s</var>; ESMTPExtensionFunc <var class="pdparam">f</var>; void * <var class="pdparam">closure</var>;

Description

Register ESMTP extensions.

Parameters

command

The extension that you wish to register, for example XCLIENT.

s

A pointer to the setup function typedef'ed in the following way: typedef int (*ESMTPExtensionSetup)(char *arg, message_construct *mc, void *closure);. This parameter can be NULL.

f

A pointer to the function that implements the extension. ESMTPExtensionFunc is typedef'ed in the following way: typedef int (*ESMTPExtensionFunc)(char *arg, Event *e, message_construct *mc, void *closure);. This parameter can be NULL.

closure

The closure function. This parameter can be NULL.

Return Values

On success this function returns 1 and on failure 0.

Threading

It is legal to call this function in the Scheduler thread.

See Also

Was this page helpful?