Atmel Software Framework

avr32/applications/evk1100-control-panel/network/smtpclient/BasicSMTP.h File Reference
#include "tracedump.h"
#include "gpio.h"
#include "board.h"
#include "shell.h"

Macros

#define v_SMTP_Post(x, y)   NAKED_TRACE_COM2("Send Mail with subject : %s\r\n",x)
 
#define v_SMTP_PostFromISR(x, y)
 

Functions

eExecStatus e_smtpclient_cmd_get_config (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply)
 The get smtp client config command: get the SMTP variables. Takes no parameter. More...
 
eExecStatus e_smtpclient_cmd_set_config (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply)
 The set smtp client config command: set the SMTP variables. More...
 

#define v_SMTP_Post (   x,
  y 
)    NAKED_TRACE_COM2("Send Mail with subject : %s\r\n",x)
#define v_SMTP_PostFromISR (   x,
  y 
)

eExecStatus e_smtpclient_cmd_get_config ( eModId  xModId,
signed short  FsNavId,
int  ac,
signed portCHAR *  av[],
signed portCHAR **  ppcStringReply 
)

The get smtp client config command: get the SMTP variables. Takes no parameter.

Note
This function must be of the type eExecStatus defined by the shell module.
Parameters
xModIdInput. The module that is calling this function.
FsNavIdIgnored.
acInput. The argument counter. For this command, should be 1.
avInput. The argument vector.
ppcStringReplyInput/Output. The response string. If Input is NULL, no response string will be output. Else a malloc for the response string is performed here; the caller must free this string.
Returns
the status of the command execution.

References MAX_CONFIG_FILE_SIZE, NULL, pvPortMalloc(), SHELL_ERRMSG_MEMALLOC, SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK, and sprintf().

Referenced by e_syscmds_cmd_get_config().

eExecStatus e_smtpclient_cmd_set_config ( eModId  xModId,
signed short  FsNavId,
int  ac,
signed portCHAR *  av[],
signed portCHAR **  ppcStringReply 
)

The set smtp client config command: set the SMTP variables.

*         Takes 4 parameters :
*                        port=ppppp
*                        server=smtp.domain.com
*                        mailto=recipient@domain.com
*                        mailfrom=sender@domain.com
* 
Note
This function must be of the type eExecStatus defined by the shell module.
Parameters
xModIdInput. The module that is calling this function.
FsNavIdIgnored.
acInput. The argument counter. For this command, should be 1.
avInput. The argument vector.
ppcStringReplyInput/Output. The response string. If Input is NULL, no response string will be output. Else a malloc for the response string is performed here; the caller must free this string.
Returns
the status of the command execution.
*         Takes 4 parameters :
*                        port=ppppp
*                        server=smtp.domain.com
*                        mailto=recipient@domain.com
*                        mailfrom=sender@domain.com
* 
Note
This function must be of the type eExecStatus defined by the shell module.
Parameters
xModIdInput. The module that is calling this function.
FsNavIdIgnored.
acInput. The argument counter. For this command, should be 1.
avInput. The argument vector.
ppcStringReplyInput/Output. The response string. If Input is NULL, no response string will be output. Else a malloc for the response string is performed here; the caller must free this string.
Returns
the status of the command execution.

References config_file_set_value(), Min, SHELL_ERRMSG_CONFIGERROR, SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK_NO_FREE, SHELL_MSG_CONFIG_SET, and SMTP_ERRMSG_CONFIGURESMTP.

Referenced by e_syscmds_cmd_set_config().