smtp-client
SMTP Client C Library
smtp Struct Reference
+ Collaboration diagram for smtp:

Data Fields

enum smtp_flag flags
 
int sock
 
struct str_getdelimfd gdfd
 
struct smtp_headerheader_list
 
size_t num_headers
 
struct smtp_addressaddress_list
 
size_t num_address
 
struct smtp_attachmentattachment_list
 
size_t num_attachment
 
long timeout_sec
 
enum smtp_status_code status_code
 
int tls_on
 
const char * cafile
 
SSL * tls
 
SSL_CTX * tls_ctx
 
BIO * tls_bio
 

Detailed Description

Main data structure that holds the SMTP client context.

Definition at line 150 of file smtp.c.

Field Documentation

◆ address_list

struct smtp_address* smtp::address_list

List of from, to, cc, and bcc email addresses.

Definition at line 179 of file smtp.c.

Referenced by smtp_address_add(), smtp_address_clear_all(), smtp_append_address_to_header(), and smtp_mail().

◆ attachment_list

struct smtp_attachment* smtp::attachment_list

List of attachments to send.

Definition at line 189 of file smtp.c.

Referenced by smtp_attachment_add_mem(), smtp_attachment_clear_all(), and smtp_print_mime_email().

◆ cafile

const char* smtp::cafile

Path to certificate file if using self-signed or untrusted certificate not in the default key store.

Definition at line 221 of file smtp.c.

Referenced by smtp_open(), and smtp_tls_init().

◆ flags

enum smtp_flag smtp::flags

Bitwise list of flags controlling the behavior of this SMTP client.

Definition at line 154 of file smtp.c.

Referenced by smtp_close(), smtp_open(), smtp_puts_dbg(), and smtp_tls_init().

◆ gdfd

struct str_getdelimfd smtp::gdfd

Read buffer and line parsing structure.

Definition at line 164 of file smtp.c.

Referenced by smtp_auth_cram_md5(), smtp_close(), smtp_getline(), smtp_open(), and smtp_read_and_parse_code().

◆ header_list

struct smtp_header* smtp::header_list

List of headers to print before the mail body.

Definition at line 169 of file smtp.c.

Referenced by smtp_header_add(), smtp_header_clear_all(), smtp_header_exists(), and smtp_mail().

◆ num_address

size_t smtp::num_address

Number of addresses in address_list.

Definition at line 184 of file smtp.c.

Referenced by smtp_address_add(), smtp_address_clear_all(), smtp_append_address_to_header(), and smtp_mail().

◆ num_attachment

size_t smtp::num_attachment

Number of attachments in attachment_list.

Definition at line 194 of file smtp.c.

Referenced by smtp_attachment_add_mem(), smtp_attachment_clear_all(), and smtp_print_mime_email().

◆ num_headers

size_t smtp::num_headers

Number of headers in header_list.

Definition at line 174 of file smtp.c.

Referenced by smtp_header_add(), smtp_header_clear_all(), smtp_header_exists(), and smtp_mail().

◆ sock

int smtp::sock

Standard network socket connection.

Definition at line 159 of file smtp.c.

Referenced by smtp_close(), smtp_connect(), smtp_open(), smtp_str_getdelimfd_read(), smtp_str_getdelimfd_read_timeout(), smtp_tls_init(), and smtp_write().

◆ status_code

◆ timeout_sec

long smtp::timeout_sec

Timeout in seconds to wait before returning with an error.

This applies to both writing to and reading from a network socket.

Definition at line 201 of file smtp.c.

Referenced by smtp_set_read_timeout(), and smtp_str_getdelimfd_read_timeout().

◆ tls

SSL* smtp::tls

OpenSSL TLS object.

Definition at line 227 of file smtp.c.

Referenced by smtp_close(), smtp_str_getdelimfd_read(), smtp_tls_init(), and smtp_write().

◆ tls_bio

BIO* smtp::tls_bio

OpenSSL TLS I/O abstraction.

Definition at line 237 of file smtp.c.

Referenced by smtp_str_getdelimfd_read(), and smtp_tls_init().

◆ tls_ctx

SSL_CTX* smtp::tls_ctx

OpenSSL TLS context.

Definition at line 232 of file smtp.c.

Referenced by smtp_close(), and smtp_tls_init().

◆ tls_on

int smtp::tls_on

Indicates if this context has an active TLS connection.

  • Set to 0 if TLS connection inactive.
  • Set to 1 if TLS connection currently active.

Definition at line 215 of file smtp.c.

Referenced by smtp_close(), smtp_str_getdelimfd_read(), smtp_tls_init(), and smtp_write().


The documentation for this struct was generated from the following file: