Skip to main content
  • Products
  • Evaluate our Software
  • Downloads
  • Free Utilities
  • Purchase
  • Silicon Vendors
  • Support
  • About Us
  • Blog
  • Forum
  • Search
  • Jobs
  • Newsletter
  • Blog
  • Contact
  • Shop
  • emNet
  • About SMTP Client

    SMTP client

    The emNet Simple Mail Transfer Protocol (SMTP) client is an optional extension which can be seamlessly integrated into your TCP/IP application. It combines a maximum of performance with a small memory footprint. The SMTP client allows an embedded system to send emails with dynamically generated content. The RAM usage of the SMTP client module has been kept to a minimum by smart buffer handling.

    Contact us
    Downloads
    Documentation
    SEGGER emNet
    1. 1.SMTP Backgrounds
    2. 2.Relevant parts
    3. 3.Resource Usage
    4. 4.Requirements
    5. 5.SMTP Relay
    6. 6.emNet SMTP Client with TLS Support

    Overview

    The Simple Mail Transfer Protocol is a text based communication protocol for electronic mail transmission across IP networks.

    Application layerApplication layer protocol:
    SMTP
    Transport layerTranport layer protocol:
    TCP
    Network layerNetwork layer protocol:
    IP
    Link layerLink layer protocol:
    Ethernet (IEEE 802.3), ...

    Key features

    • 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.

    SMTP Backgrounds

    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:

    • PLAIN
    • LOGIN
    • CRAM-MD5
    • NTLM

    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: <1000.2234@sample.com>
    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

    Relevant parts

    The SMTP client implements the relevant parts of the following Request For Comments (RFC).

    RFC#Description
    [RFC 821]Direct Link: Simple Mail Transfer Protocol (Aug 1982)
    [RFC 974]Direct Link: Mail routing and the domain system
    [RFC 5321]Direct Link: Simple Mail Transfer Protocol (Oct 2008)

    Resource Usage

    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.

    Configuration used:

    #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.

    Add-onROM
    emNet SMTP ClientApproximately 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.

    Add-onROM
    emNet SMTP ClientApproximately 6.5 KByte

    RAM Usage:

    Add-onRAM
    emNet SMTP ClientApproximately 4.7 KByte

    Requirements

    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.

    SMTP Relay

    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.

    emNet SMTP Client with TLS Support

    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.

    • User manual
    • Online documentation
    • List of downloads
    • Release notes
    • Update notification
    • Pricing
    • Support
    • Silicon vendor resources

    Headquarters

    SEGGER Microcontroller GmbH

    Ecolab-Allee 5
    40789 Monheim am Rhein, Germany
    info@segger.com
    Tel.: +49-2173-99312-0
    Fax: +49-2173-99312-28

    Locations

    USA: SEGGER Microcontroller Systems LLC

    Boston area
    101 Suffolk Lane
    Gardner, MA 01440, USA
    us-east@segger.com
    Tel.: +1-978-874-0299
    Fax: +1-978-874-0599

    Silicon Valley
    Milpitas, CA 95035, USA
    us-west@segger.com
    Tel.: +1-408-767-4068

    China: SEGGER Microcontroller China Co., Ltd.

    Room 218, Block A, Dahongqiaoguoji
    No. 133 Xiulian Road
    Minhang District, Shanghai 201199, China
    china@segger.com
    Tel.: +86-133-619-907-60

    ISO 9001 certified

    ISO 9001

    30+ years of experience

    First-class embedded software tools since 1992
    • Imprint
    • Disclaimer
    • Code of Conduct
    • Privacy Policy
    © 2025 SEGGER - All rights reserved.