329 u_int8_t in[3], out[4];
337 mail_data = (
char *) malloc (
MAX_DATA *
sizeof(
char));
339 if ( mail_data ==
NULL )
466 while ( (*p & 0xff) != 0)
473 in[i] = (*p++) & 0xff;
484 *t++ = out[0] & 0xff;
485 *t++ = out[1] & 0xff;
486 *t++ = out[2] & 0xff;
487 *t++ = out[3] & 0xff;
522 while ( (*p & 0xff) != 0)
529 in[i] = (*p++) & 0xff;
540 *t++ = out[0] & 0xff;
541 *t++ = out[1] & 0xff;
542 *t++ = out[2] & 0xff;
543 *t++ = out[3] & 0xff;
static char cmd_string[120]
Definition: SMTP.c:199
int32_t set_recv_buffer(SOCKET *so, void *data, uint16_t maxdatasize)
Define a socket buffer.
#define SMTPGATEWAY
Definition: SMTP.c:130
#define MAX_DATA
Definition: SMTP.c:124
int32_t shutdown(SOCKET *so, int32_t timeout)
Active shut-down of a TCP connection.
#define SMTP_CONNECT_TIMEOUT
Definition: BoardSpecific.h:241
static char cont_msg[]
Definition: SMTP.c:207
char * inet_ntoa(uint32_t i_addr, char *s)
Convert IP-address from 0xbbaaddcc to "aaa.bbb.ccc.ddd".
#define ANY_PORT
Definition: net.h:519
#define SMTP_SERVICE_CLOSING
Definition: SMTP.c:169
#define NULL
Definition: net.h:126
int32_t connect(SOCKET *so, void *data, uint32_t send_max, int32_t timeout)
Actively establish a connection.
#define UINT32_C(value)
Definition: stdint.h:210
#define SHUTDOWN_TIMEOUT
Definition: BoardSpecific.h:246
static char rcpt_msg[]
Definition: SMTP.c:196
FUNC_RETURN ProcessTimeout(T_TimeOutTimer *tot, time_t timeout)
Definition: timer.c:219
#define SMTP_REQUEST_OK
Definition: SMTP.c:170
#define TCP_INIT_FUNC
Definition: net.h:499
int32_t socket_close(SOCKET *so)
Close a socket and free all associated memory.
static char auth_name[]
Definition: SMTP.c:193
SOCKET * socket_open(char *dest_addr, uint16_t dest_port, uint16_t src_port, uint8_t data_type, int32_t(*init_func)(SOCKET *))
Create a new socket.
static char quit_msg[]
Definition: SMTP.c:197
int32_t net_send_string(SOCKET *so, char *data)
Send a zero terminated string via the specified socket.
static char auth_msg[]
Definition: SMTP.c:192
static char prio_msg[]
Definition: SMTP.c:208
FUNC_RETURN
Definition: Common.h:279
static char data_msg[]
Definition: SMTP.c:191
void encodeblock(u_int8_t *in, u_int8_t *out, int32_t len)
static char from_msg[]
Definition: SMTP.c:204
#define SMTP_SERVICE_READY
Definition: SMTP.c:168
FUNC_RETURN ResetTimeOutTimer(T_TimeOutTimer *tot, char symbol, time_t period, char *text)
Definition: timer.c:175
uint32_t get_ip_address(uint16_t dev_nr)
Get configured IP address.
static char auth_pass[]
Definition: SMTP.c:194
#define DATATYPE_CHAR
Definition: net.h:489
MAILSTATE_t
Definition: SMTP.c:140
int32_t get_reply_code(SOCKET *mail, char *mail_data, char *text)
Definition: SMTP.c:248
void net_isq(void)
The main polling function for processing sockets, must be periodically called in the main application...
int int32_t
Definition: stdint.h:46
#define INVALID_SOCKET
Definition: net.h:540
static char endmail[]
Definition: SMTP.c:209
static char to_msg[]
Definition: SMTP.c:205
static char mail_from[]
Definition: SMTP.c:195
#define SMTP_AUTHENTICATED
Definition: SMTP.c:171
#define SMTP_START_MAIL
Definition: SMTP.c:172
static char sub_msg[]
Definition: SMTP.c:206