libwebsockets
Lightweight C library for HTML5 websockets
Loading...
Searching...
No Matches
lws-smtp-client.h
Go to the documentation of this file.
1/*
2 * libwebsockets - small server side websockets and web server implementation
3 *
4 * Copyright (C) 2010 - 2026 Andy Green <andy@warmcat.com>
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to
8 * deal in the Software without restriction, including without limitation the
9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 */
24
25#ifndef _LWS_SMTP_CLIENT_H
26#define _LWS_SMTP_CLIENT_H
27
59
60#define LWS_SMTPC_PROTOCOL_NAME "lws-smtp-client"
61
71
85
93
106typedef void (*lws_smtpc_done_cb_t)(void *opaque, const lws_smtp_email_t *email,
107 const lws_smtpc_result_t *res);
108
139
140struct lws_smtpc;
141
142#if defined(LWS_WITH_EMAIL)
143
155LWS_VISIBLE LWS_EXTERN struct lws_smtpc *
156lws_smtpc_create(const lws_smtpc_info_t *info);
157
168lws_smtpc_destroy(struct lws_smtpc **psmtpc);
169
193LWS_VISIBLE LWS_EXTERN struct lws_smtpc *
194lws_smtpc_vhost(struct lws_vhost *vh);
195
213lws_smtpc_queue(struct lws_smtpc *smtpc, const lws_smtp_email_t *email,
214 lws_smtpc_done_cb_t cb, void *opaque);
215
216#endif
217
219
220#endif
struct lws_smtp_email lws_smtp_email_t
const lws_retry_bo_t * retry
const char * helo
lws_smtpc_outcome_t outcome
uint16_t reply_timeout_secs
const char * text
struct lws_vhost * vhost
const char * host
lws_smtpc_tls_t tls
const char * address
enum lws_smtpc_tls lws_smtpc_tls_t
void(* lws_smtpc_done_cb_t)(void *opaque, const lws_smtp_email_t *email, const lws_smtpc_result_t *res)
lws_smtpc_tls
struct lws_smtpc_info lws_smtpc_info_t
lws_smtpc_outcome
struct lws_smtpc_result lws_smtpc_result_t
enum lws_smtpc_outcome lws_smtpc_outcome_t
@ LWS_SMTPC_TLS_NONE
@ LWS_SMTPC_TLS_STARTTLS
@ LWS_SMTPC_TLS_IMPLICIT
@ LWS_SMTPC_ABANDONED
@ LWS_SMTPC_DELIVERED
@ LWS_SMTPC_REFUSED
@ LWS_SMTPC_GAVE_UP
unsigned short uint16_t
unsigned int uint32_t
#define LWS_EXTERN
unsigned char uint8_t
#define LWS_VISIBLE
struct lws_retry_bo lws_retry_bo_t