Delta Chat Core C-API
src
dc_smtp.h
1
#ifndef __DC_SMTP_H__
2
#define __DC_SMTP_H__
3
#ifdef __cplusplus
4
extern
"C"
{
5
#endif
6
7
8
#include "dc_loginparam.h"
9
10
11
/*** library-private **********************************************************/
12
13
typedef
struct
_dc_smtp dc_smtp_t;
14
15
struct
_dc_smtp
16
{
17
mailsmtp* etpan;
18
char
* from;
19
int
esmtp;
20
21
int
log_connect_errors;
22
23
dc_context_t
* context;
/* only for logging! */
24
25
char
* error;
26
int
error_etpan;
// one of the MAILSMTP_ERROR_* codes, eg. MAILSMTP_ERROR_EXCEED_STORAGE_ALLOCATION
27
};
28
29
dc_smtp_t* dc_smtp_new (
dc_context_t
*);
30
void
dc_smtp_unref (dc_smtp_t*);
31
int
dc_smtp_is_connected (
const
dc_smtp_t*);
32
int
dc_smtp_connect (dc_smtp_t*,
const
dc_loginparam_t*);
33
void
dc_smtp_disconnect (dc_smtp_t*);
34
int
dc_smtp_send_msg (dc_smtp_t*,
const
clist* recipients,
const
char
* data,
size_t
data_bytes);
35
36
37
#ifdef __cplusplus
38
}
/* /extern "C" */
39
#endif
40
#endif
/* __DC_SMTP_H__ */
41
dc_context_t
An object representing a single account.
Generated by
1.8.13