The Simple Mail Transfer Protocol is a text based communication protocol for electronic mail transmission across IP networks.
|Application layer||Application layer protocol:|
|Transport layer||Tranport layer protocol:|
|Network layer||Network layer protocol:|
|Link layer||Link layer protocol:|
Ethernet (IEEE 802.3), ...
- Low memory footprint.
- Independent of the TCP/IP stack: any stack with sockets can be used.
- Example applications included.
- Project for executable on PC for Microsoft Visual Studio included.
- Send emails securely via TLS with emSSL. This allows using almost any mail server on the internet.1
1 emSSL delivers the secure connection and has to be purchased separately.
Using SMTP, an emNet application can transfer mail to an SMTP server on the same network or to SMTP servers in other networks via a relay or gateway server accessible to both networks. When the emNet SMTP client has a message to transmit, it establishes a TCP connection to an SMTP server and transmits the message content after the handshaking.
The handshaking mechanism normally includes an authentication process. The RFC define the following four different authentication schemes:
In the current version, the emNet SMTP client supports only LOGIN authentication.
The following listing shows a typical SMTP session:
S: 220 srv.sample.com ESMTP C: HELO S: 250 srv.sample.com C: AUTH LOGIN S: 334 VXNlcm5hbWU6 C: c3BzZXk29IulbkY29tZcZXIbtZ S: 334 UGFzc3dvcmQ6 C: UlblhFz7ZlblsZlZQ== S: 235 go ahead C: Mail from: S: 250 ok C: Rcpt to: S: 250 ok C: Rcpt to: S: 250 ok C: Rcpt to: S: 250 ok C: DATA S: 354 go ahead C: Message-ID: <firstname.lastname@example.org> C: From: "User0" C: TO: "User1" C: CC: "User2" , "User3" C: Subject: Testmail C: Date: 1 Jan 2008 00:00 +0100 C: C: This is a test! C: C: . S: 250 ok 1231221612 qp 3364 C: quit S: 221 srv.sample.com
Many mail servers on the internet accept only secure connections. The emNet SMTP client can be extended with emSSL to create a secure connection using TLS. This allows using almost any mail server on the internet. emSSL has to be purchased in addition to emNet and comes with the sources for using the SMTP client with TLS.
The emNet SMTP Client may also be used in combination with an SMTP Relay Client. A document descibing the configuration of an exemplary SMTP Relay Client application, the Mercury Mail Transport System, is available at our download page.
TCP/IP stack: The emNet SMTP client requires a TCP/IP stack. It is optimized for emNet, but any RFC compliant TCP/IP stack can be used. The shipment includes a Win32 simulation, which uses the standard Winsock API and an implementation which uses the socket API of emNet.
Multi Tasking: The SMTP client needs to run as a separate thread. Therefore, a multi tasking system is required to use the emNet SMTP client.
The ROM usage depends on the compiler options, the compiler version and the used CPU. The memory requirements of the SMTP Client module presented in the tables below have been measured on an ARM7 and a Cortex-M3 system. Details about the further configuration can be found in the sections of the specific example.
#define SMTPC_OUT_BUFFER_SIZE 256
ROM Usage on an ARM7 System: The following resource usage has been measured on an ARM7 system using IAR Embedded Workbench V6.30.6, Thumb mode, no interwork, size optimization.
|emNet SMTP Client||Approximately 7.1 KByte|
ROM Usage on a Cortex-M3 System: The following resource usage has been measured on a Cortex-M3 system using IAR Embedded Workbench V6.30.6, size optimization.
|emNet SMTP Client||Approximately 6.5 KByte|