SMTPS is used to send secure e-mail notifications from an embedded system to various recipients. This example shows how to setup an SMTPS client for this purpose.
The following picture shows an exemplary connection of the development board and a Computer.
The SMTPS Client project is available as part of the Network Reference examples.
Following files implement application-specific logic in the example:
SMTPS_Client.c
contains the application main thread which initializes the Network Component and provides the information required to compose and send an email. The following changes are required:Configuration files for the software components used in the project are located in the ./RTE/
directory and can be modified by users to adjust the operation of related components.
Following configuration files are provided with this example:
./RTE/Network/
folder:Net_Config_SMTP_Client.h
: SMTP Client configurationNet_Config_DNS_Client.h
: DNS Client configurationNet_Config_TCP.h
: TCP Socket configurationNet_Config_UDP.h
: UDP Socket configurationNet_Config_ETH_0.h
: Ethernet Interface configurationNet_Config.h
: Network Core configurationNet_Security.c
: file with keys and certificates. Default values are used by default, for changing them refer to Adding server root CA certificateNet_Debug.h
: Network Debug configuration./RTE/Security/
folder:mbedTLS_config.h
, mbedTLS_crypto_config.h
: mbedTLS configuration files./RTE/CMSIS/
folder:RTX_Config.h
and RTX_Config.c
: CMSIS-RTX Configuration files for the RTOS KernelWhen a board layer is added to the project, corresponding configuration files for the board and device components will become available in the local ./Board/
directory.
In order to build the project it shall be extended with a compatible board layer that provides following interfaces as connections:
CMSIS_ETH
: CMSIS-Driver for Ethernet interfaceCMSIS_VIO
: CMSIS-Driver for Virtual I/O interfaceSTDOUT
: Standard Output redirectionWorking with MDK-Middleware Examples explains the workflow for accessing, configuring and building an MDK-Middleware example project for your target hardware.
Setup
Board-specific hardware setup such as jumpers, Ethernet ports, power supply, etc. is documented in the board layer description (README.md
) of your selected target.
Example execution
If you have entered your personal e-mail address as the recipient's address, you only need to open your mail program and check your inbox.