libwebsockets
Lightweight C library for HTML5 websockets
lws_email Struct Reference

#include <libwebsockets.h>

Data Fields

void * data
 
uv_loop_t * loop
 
char email_smtp_ip [32]
 
char email_helo [32]
 
char email_from [100]
 
char email_to [100]
 
unsigned int max_content_size
 
int(* on_next )(struct lws_email *email)
 
int(* on_sent )(struct lws_email *email)
 
int(* on_get_body )(struct lws_email *email, char *buf, int len)
 
uv_timer_t timeout_email
 
enum lwsgs_smtp_states estate
 
uv_connect_t email_connect_req
 
uv_tcp_t email_client
 
time_t email_connect_started
 
char email_buf [256]
 
char * content
 

Detailed Description

struct lws_email - abstract context for performing SMTP operations

Field Documentation

◆ content

char* lws_email::content

private

◆ data

void* lws_email::data

opaque pointer set by user code and available to the callbacks

◆ email_buf

char lws_email::email_buf[256]

private

◆ email_client

uv_tcp_t lws_email::email_client

private

◆ email_connect_req

uv_connect_t lws_email::email_connect_req

private

◆ email_connect_started

time_t lws_email::email_connect_started

private

◆ email_from

char lws_email::email_from[100]

Fill before init or on_next

◆ email_helo

char lws_email::email_helo[32]

Fill before init, eg, "myserver.com"

◆ email_smtp_ip

char lws_email::email_smtp_ip[32]

Fill before init, eg, "127.0.0.1"

◆ email_to

char lws_email::email_to[100]

Fill before init or on_next

◆ estate

enum lwsgs_smtp_states lws_email::estate

private

◆ loop

uv_loop_t* lws_email::loop

the libuv loop we will work on

◆ max_content_size

unsigned int lws_email::max_content_size

largest possible email body size

◆ on_get_body

int(* lws_email::on_get_body) (struct lws_email *email, char *buf, int len)

(Fill in before calling lws_email_init) called when the body part of the queued email is about to be sent to the SMTP server.

◆ on_next

int(* lws_email::on_next) (struct lws_email *email)

(Fill in before calling lws_email_init) called when idle, 0 = another email to send, nonzero is idle. If you return 0, all of the email_* char arrays must be set to something useful.

◆ on_sent

int(* lws_email::on_sent) (struct lws_email *email)

(Fill in before calling lws_email_init) called when transfer of the email to the SMTP server was successful, your callback would remove the current email from its queue

◆ timeout_email

uv_timer_t lws_email::timeout_email

private


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