libESMTP Types

libESMTP Types

The following types are defined by libESMTP.

smtp_enumerate_messagecb_t

Typedef: Message callback.

Syntax

void smtp_enumerate_messagecb_t (smtp_message_t message, void *arg)

Parameters

smtp_message_t message

The session.

void *arg

User data passed to smtp_enumerate_messages().

Description

Callback function to handle a message.

smtp_enumerate_recipientcb_t

Typedef: Recipient callback.

Syntax

void smtp_enumerate_recipientcb_t (smtp_recipient_t recipient, const char *mailbox, void *arg)

Parameters

smtp_recipient_t recipient

The recipient.

const char *mailbox

Mailbox name.

void *arg

User data passed to smtp_enumerate_recipients().

Description

Callback to process a recipient.

enum rfc2822_timeouts

Specify timeout.

Constants

Timeout_GREETING

Timeout waiting for server greeting.

Timeout_ENVELOPE

Timeout for envelope responses.

Timeout_DATA

Timeout waiting for data transfer to begin.

Timeout_TRANSFER

Timeout for data transfer phase.

Timeout_DATA2

Timeout for data transfer phase.

Description

Timeout flags. In addition Timeout_OVERRIDE_RFC2822_MINIMUM may be bitwise-ORed with above to override recommended minimum timeouts.

enum ret_flags

DSN request flags.

Constants

Ret_NOTSET

DSN is not requested.

Ret_FULL

Request full message in DSN.

Ret_HDRS

Request only headers in DSN.

Description

DSN flags specifying requested notification.

enum notify_flags

DSN notification conditions.

Constants

Notify_NOTSET

Notify options not requested.

Notify_NEVER

Never notify.

Notify_SUCCESS

Notify delivery success.

Notify_FAILURE

Notify delivery failure.

Notify_DELAY

Notify delivery is delayed.

Description

DSN notify flags.

enum e8bitmime_body

Message body type.

Constants

E8bitmime_NOTSET

Body type not declared.

E8bitmime_7BIT

Body conforms with RFC 5322.

E8bitmime_8BITMIME

Body uses 8 bit encoding.

E8bitmime_BINARYMIME

Body uses BINARYMIME encoding.

Description

8BITMIME extension flags.

enum by_mode

Delivery flags.

Constants

By_NOTSET

Deliver-by notification not requested.

By_NOTIFY

FIXME

By_RETURN

FIXME

Description

DELIVERBY (RFC 2852) extension flags.

enum starttls_option

TLS mode options

Constants

Starttls_DISABLED

Do not use TLS, even if offered by the MTA.

Starttls_ENABLED

Use TLS if offered by the MTA.

Starttls_REQUIRED

Exit session if TLS is not offered by the MTA.

smtp_starttls_passwordcb_t

Typedef: Password callback signature.

Syntax

int smtp_starttls_passwordcb_t (char *buf, int buflen, int rwflag, void *arg)

Parameters

char *buf

Buffer to receive the password.

int buflen

Length of the buffer.

int rwflag

0 for reading/decryption, 1 for writing/encryption.

void *arg

User data passed to smtp_starttls_set_password_cb().

Description

The callback function declaration is cleverly chosen to be the same as the OpenSSL declaration.

Return

Actual length of password.