mikroSDK Reference Manual
smtp_client_transport.h
Go to the documentation of this file.
1
31#ifndef _SMTP_CLIENT_TRANSPORT_H
32#define _SMTP_CLIENT_TRANSPORT_H
33
34//Dependencies
35#include "core/net.h"
36#include "smtp/smtp_client.h"
37
38//C++ guard
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43//SMTP client related functions
44error_t smtpClientOpenConnection(SmtpClientContext *context);
45
46error_t smtpClientEstablishConnection(SmtpClientContext *context,
47 const IpAddr *serverIpAddr, uint16_t serverPort);
48
49error_t smtpClientOpenSecureConnection(SmtpClientContext *context);
50error_t smtpClientEstablishSecureConnection(SmtpClientContext *context);
51
52error_t smtpClientShutdownConnection(SmtpClientContext *context);
53void smtpClientCloseConnection(SmtpClientContext *context);
54
55error_t smtpClientSendData(SmtpClientContext *context, const void *data,
56 size_t length, size_t *written, uint_t flags);
57
58error_t smtpClientReceiveData(SmtpClientContext *context, void *data,
59 size_t size, size_t *received, uint_t flags);
60
61//C++ guard
62#ifdef __cplusplus
63}
64#endif
65
66#endif
error_t
Error codes.
Definition error.h:43
TCP/IP stack core.
SMTP client (Simple Mail Transfer Protocol)
IP network address.
Definition ip.h:72