Wiznet makers

scott

Published April 24, 2026 ©

118 UCC

20 WCC

45 VAR

0 Contests

0 Followers

0 Following

Original Link

EMailSender Library

EMailSender Library

COMPONENTS
PROJECT DESCRIPTION

요약

EMailSender는 Arduino, ESP32, STM32 등 주요 임베디드 플랫폼에서 SMTP 이메일을 전송할 수 있는 오픈소스 Arduino 라이브러리입니다. WIZnet W5500 Ethernet 컨트롤러와 조합하면, 하드웨어 TCP/IP 오프로딩을 통해 MCU 부하를 최소화하면서 안정적인 유선 이메일 알림 시스템을 구축할 수 있습니다. WiFi가 닿지 않는 산업 현장, 장기 무인 운영 환경에서 특히 주목할 만한 구성입니다.


개요

IoT 기기가 현장에 배포되면, 가장 먼저 필요해지는 기능 중 하나가 이상 감지 알림입니다. 온도 임계값 초과, 설비 오류, 침입 감지 — 이런 이벤트를 실시간으로 담당자에게 전달하는 수단으로 이메일은 여전히 가장 범용적이고 신뢰할 수 있는 채널입니다.

문제는 구현입니다. MCU에서 직접 SMTP 연결을 맺고, 인증을 처리하고, MIME 포맷을 조립하고, 첨부파일을 Base64로 인코딩하는 과정은 결코 단순하지 않습니다. 여기에 Gmail의 보안 정책 강화(앱 비밀번호 강제화, STARTTLS 요구)까지 더해지면 난이도는 한층 높아집니다.

EMailSender 라이브러리는 이 복잡도 전체를 단일 API 뒤로 감춥니다. 그리고 네트워크 연결 계층에 W5500을 배치하면, TCP/IP 처리를 하드웨어가 전담하여 MCU는 이메일 조립과 애플리케이션 로직에만 집중할 수 있는 구조가 완성됩니다.

AI Image

EMailSender 라이브러리 소개

EMailSender는 Renzo Mischianti가 개발한 오픈소스 라이브러리로, 현재 v4.1.3 (2026년 1월 기준)까지 업데이트되어 있습니다. Arduino IDE와 PlatformIO 모두에서 사용할 수 있으며, MIT 라이선스로 배포됩니다.

지원 플랫폼 및 기능 매트릭스

플랫폼WiFiEthernetSSL/TLSSTARTTLS
ESP32
ESP8266
Arduino UNO/Mega
Arduino SAMD
STM32
Raspberry Pi Pico W

지원 네트워크 인터페이스

  • WiFiClient / WiFiClientSecure (ESP32, ESP8266)
  • WiFiNINA (Arduino SAMD)
  • Ethernet W5100 / W5200 / W5500 (WIZnet)
  • UIPEthernet (ENC28J60)
  • SSLClient 래퍼 (유선 Ethernet에서 보안 연결)

지원 스토리지 (첨부파일용)

  • 내장 Flash: SPIFFS, LittleFS, FFAT (ESP32/ESP8266)
  • 외부 SD카드: SD, SdFat v1/v2
  • Stream / String 직접 첨부 (v4.1.0 이상)

보안 연결 방식

  • STARTTLS (Port 587): 평문으로 연결 후 암호화 업그레이드. 현대 Gmail 기본 요구사항
  • Implicit SSL/TLS (Port 465): 처음부터 암호화 연결
  • 비암호화 SMTP (Port 25): Arduino UNO/Mega 등 RAM 제약 환경 전용

플랫폼별 구성 비교

EMailSender는 하나의 라이브러리이지만, 어떤 MCU와 네트워크 인터페이스를 선택하느냐에 따라 구성과 제약이 크게 달라집니다.

구성네트워크SSL 지원주요 특징
ESP32 + WiFi무선빠른 프로토타이핑, 내장 WiFi 활용
ESP32 + W5500유선산업 환경 장기 운영, 전파 간섭 없음
ESP8266 + WiFi무선저가 구성, RAM 제약 주의
STM32 + W5500유선WiFi 미내장, BearSSL 연동
Arduino Mega + W5500유선RAM 8KB 제약, 비암호화 SMTP만 가능
Arduino UNO + W5500유선RAM 2KB 제약, 소규모 단순 알림

ESP32: WiFi를 내장하고 있어 별도 모듈 없이 이메일 전송이 가능합니다. 그러나 공장 내부, 지하 설비실, 전파 간섭이 심한 환경에서는 WiFi 연결이 불안정해지거나 장기 운영 중 끊김이 발생할 수 있습니다. 이런 환경에서는 ESP32에 W5500을 추가하여 유선 Ethernet으로 전환하는 것이 현실적인 선택입니다. ESP32의 연산 능력과 W5500의 안정적인 유선 연결을 함께 활용할 수 있습니다.

STM32: WiFi를 내장하지 않아 Ethernet 쉴드가 필수입니다. W5500은 STM32와 SPI로 연결되며, BearSSL 기반 SSLClient를 통해 SSL/TLS 암호화 이메일 전송까지 지원합니다. EMailSender 공식 튜토리얼에서 STM32 + W5500 조합을 별도로 다룰 만큼, 검증된 레퍼런스 구성입니다.

Arduino UNO/Mega: W5500 Ethernet 쉴드를 사용할 수 있지만, RAM 제약(UNO 2KB, Mega 8KB)으로 인해 BearSSL 동작에 필요한 최소 24KB를 확보할 수 없어 SSL/TLS는 불가합니다. 비암호화 SMTP(Port 25) 또는 로컬 SMTP 릴레이 서버를 경유하는 방식으로 우회해야 합니다.


시스템 아키텍처

AI Image

MCU는 이메일 내용 조립과 암호화 처리에 집중하고, W5500이 TCP/IP 스택 전체를 하드웨어로 처리합니다. MCU와 W5500 사이는 SPI 인터페이스로 연결되며, W5500 내부에서 TCP 연결 수립·유지·종료가 독립적으로 처리됩니다.


W5500이 이 구조에서 하는 일

이메일 전송은 단순한 데이터 전달이 아닙니다. SMTP 핸드셰이크, TCP 연결 수립, TLS 암호화 협상, MIME 데이터 스트리밍까지 복합적인 네트워크 처리가 필요합니다. 이 처리를 어디서 담당하느냐에 따라 시스템 안정성과 MCU 부하가 크게 달라집니다.

ENC28J60 (소프트웨어 스택) 대비 W5500 비교

항목ENC28J60W5500
TCP/IP 처리MCU 소프트웨어하드웨어 내장
MCU 부하높음낮음
코드 복잡도UIPEthernet 필요표준 Ethernet 라이브러리
안정성소프트웨어 스택 품질 의존하드웨어 수준 안정성
동시 소켓 수제한적최대 8개
SSL 연동어려움BearSSL SSLClient 연동 용이

ESP32 내장 WiFi 소프트웨어 스택 대비 W5500

ESP32의 WiFi는 소프트웨어 기반 TCP/IP 스택(lwIP)을 사용합니다. 단기 프로젝트나 실내 환경에서는 충분하지만, 산업 환경 장기 운영에서는 한계가 드러납니다. W5500의 하드웨어 TCP/IP 스택은 외부 간섭에 영향받지 않으며, MCU와 독립적으로 동작하여 ESP32의 연산 자원을 애플리케이션 로직에 온전히 사용할 수 있습니다.

STM32 + W5500에서의 SSL/TLS 처리

STM32 + W5500 구성에서는 BearSSL 기반 SSLClient 래퍼를 통해 암호화 이메일 전송이 가능합니다. W5500이 TCP 연결을 하드웨어로 처리하고, BearSSL이 그 위에서 TLS 레이어를 담당하는 구조입니다. EMailSender는 이 두 계층을 자동으로 연계하여, 사용자는 SMTP 서버 주소와 포트만 지정하면 됩니다.

AI Image

구현 핵심 포인트

라이브러리 설치

Arduino IDE의 라이브러리 관리자에서 "EMailSender"를 검색하여 설치합니다. PlatformIO 사용 시 platformio.ini에 아래와 같이 추가합니다.

lib_deps =
    xreef/EMailSender@^4.1.3

SMTP 설정: STARTTLS vs SSL/TLS 선택 기준

  • STARTTLS (Port 587): Gmail 등 현대 SMTP 서버의 기본 요구사항. ESP32, STM32, Arduino SAMD에서 사용 가능
  • Implicit SSL/TLS (Port 465): 연결 시작부터 암호화. 일부 기업 메일 서버에서 선호
  • 비암호화 (Port 25): Arduino UNO/Mega 등 RAM 제약 환경 전용. 사내 SMTP 릴레이와 함께 사용

Gmail 사용 시 필수 설정

Google은 2022년부터 일반 계정 비밀번호를 통한 SMTP 접근을 차단했습니다. Gmail을 SMTP 서버로 사용하려면 반드시 앱 비밀번호(App Password) 를 생성해야 합니다.

  • Google 계정 → 보안 → 2단계 인증 활성화
  • 앱 비밀번호 생성 (16자리)
  • 코드에 일반 비밀번호 대신 앱 비밀번호 입력

ESP32 + W5500 SPI 설정 예시

#include <Ethernet.h>
#include <EMailSender.h>

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

EMailSender emailSend("your@gmail.com", "app_password",
                      "your@gmail.com", "Sender Name",
                      "smtp.gmail.com", 587);

void setup() {
    Ethernet.init(5);  // ESP32의 W5500 CS 핀
    Ethernet.begin(mac);

    EMailSender::EMailMessage message;
    message.subject = "센서 이상 감지";
    message.message = "온도가 임계값을 초과했습니다.";

    emailSend.send("admin@example.com", message);
}

STM32 + W5500 SSL 연동 시 주의사항

  • SSLClient(BearSSL) 라이브러리를 별도 설치 필요
  • EMailSenderKey.h에서 SSL 관련 define 설정 확인
  • STM32의 Flash 용량이 충분한지 사전 확인 (BearSSL 포함 시 바이너리 크기 증가)

Arduino UNO/Mega RAM 제약 우회 방안

  • 로컬 SMTP 릴레이 서버 구성: 내부 네트워크에 릴레이 서버를 두고, Arduino는 비암호화로 릴레이에 전송, 릴레이가 외부로 SSL 전송 처리
  • 메시지 크기 최소화: 첨부파일 비활성화, 짧은 본문 유지
  • 플랫폼 전환 검토: 보안이 필요하다면 ESP32 또는 STM32로 전환

실제 적용 시나리오

AI Image

산업 설비 이상 감지 알림 (STM32 + W5500)

공장 내 CNC 설비에 STM32를 연결하고, W5500으로 사내 LAN에 접속합니다. 설비 오류 코드가 감지되면 EMailSender가 담당 엔지니어에게 즉시 이메일을 발송합니다. WiFi 설치가 어려운 금속 구조물 내부에서도 유선 Ethernet으로 안정적인 알림이 가능합니다.

원격 환경 모니터링 (ESP32 + W5500)

농업용 온실, 데이터센터 항온항습 설비 등 24시간 무인 운영 환경에서 ESP32 + W5500 조합을 활용합니다. WiFi 장기 운영 중 발생하는 연결 끊김 문제 없이, 온도·습도 임계값 초과 시 관리자에게 이메일 알림과 함께 센서 로그 파일을 첨부파일로 전송할 수 있습니다.

출입 통제 이벤트 로그 전송 (ESP32 + W5500 + SD카드)

RFID 출입 통제 시스템에 ESP32 + W5500을 결합하면, 비인가 접근 시도 시 이벤트 로그와 함께 이미지(카메라 모듈 연동 시)를 첨부하여 보안 담당자에게 자동 발송하는 시스템을 구현할 수 있습니다.

소규모 생산 설비 모니터링 (Arduino Mega + W5500)

PLC 도입이 부담스러운 소규모 제조 현장에서 Arduino Mega + W5500 조합으로 간단한 알림 시스템을 구축합니다. SSL은 지원되지 않지만, 사내 SMTP 릴레이 서버를 경유하면 보안 요구사항을 충족하면서 비용을 최소화할 수 있습니다.


한계 및 개선 방향

EMailSender + W5500 조합은 실용적이고 검증된 구성이지만, 운영 환경에 따라 몇 가지 제약을 미리 파악해두는 것이 중요합니다.

현재 한계

  • Arduino UNO/Mega SSL 불가: RAM 제약(2KB~8KB)으로 BearSSL 동작 불가. W5500을 사용하더라도 암호화 이메일 전송은 지원되지 않음
  • 로컬 큐 미지원: 네트워크 장애 발생 시 이메일이 유실됨. 재전송 로직은 애플리케이션 레벨에서 직접 구현해야 함
  • 단일 SMTP 연결: 동시 다중 이메일 발송이 불가능하며, 순차 처리만 지원
  • SMTP 서버 의존: Gmail 등 외부 SMTP 서버 정책 변경(앱 비밀번호, OAuth 전환 등)에 대응 필요

개선 방향

  • 로컬 SMTP 릴레이 서버 도입: Postfix 등 경량 릴레이를 내부 네트워크에 구성하면 Arduino UNO/Mega에서도 보안 이메일 전송이 가능하고, 큐 기능도 확보할 수 있음
  • PoE(Power over Ethernet) 적용: W5500 기반 유선 Ethernet 구성에 PoE를 추가하면 전원과 네트워크를 단일 케이블로 처리할 수 있어 현장 배선이 대폭 단순화됨. WIZnet의 PoE 지원 모듈과 조합하면 별도 어댑터 없이 구현 가능
  • 재전송 로직 추가: 이메일 발송 실패 시 SD카드 또는 Flash에 임시 저장 후 네트워크 복구 시 재시도하는 로직을 애플리케이션 레벨에서 구현
  • 플랫폼 전환 검토: 보안과 안정성이 모두 필요한 환경이라면 Arduino Mega보다 ESP32 + W5500 또는 STM32 + W5500 전환을 권장

FAQ

Q. ESP32에서 WiFi 대신 굳이 W5500을 써야 하는 경우는 어떤 상황인가요?

전파 간섭이 심한 공장 내부, WiFi AP 설치가 어려운 지하 설비실, 또는 24시간 무인 운영으로 장기 연결 안정성이 중요한 환경입니다. WiFi는 AP 재시작, 인증 만료, 간섭 등으로 장기 운영 시 연결이 끊기는 경우가 있지만, W5500 유선 Ethernet은 이런 변수가 없습니다.

Q. Arduino UNO에서도 W5500으로 이메일 전송이 가능한가요?

가능합니다. 단, RAM 2KB 제약으로 SSL/TLS는 지원되지 않습니다. 비암호화 SMTP(Port 25)를 사용하거나, 사내 SMTP 릴레이 서버를 경유하는 방식으로 운영해야 합니다. 보안이 중요한 환경이라면 STM32 또는 ESP32로 전환을 권장합니다.

Q. Gmail 이외의 SMTP 서버(사내 메일 등)에도 적용 가능한가요?

네. EMailSender는 SMTP 서버 주소, 포트, 인증 방식을 자유롭게 설정할 수 있어 사내 Exchange 서버, Outlook, Yahoo, 자체 구축 SMTP 서버 모두 사용 가능합니다.

Q. STARTTLS와 SSL/TLS 중 어떤 것을 선택해야 하나요?

Gmail을 사용한다면 STARTTLS (Port 587) 를 기본으로 선택하십시오. 일부 기업 메일 서버에서는 Implicit SSL (Port 465)을 요구하기도 합니다. 운영할 SMTP 서버의 정책을 먼저 확인하고 맞는 방식을 선택하면 됩니다.

Q. 첨부파일 크기 제한이 있나요?

라이브러리 자체의 제한보다 MCU의 RAM과 Flash 용량이 실질적인 한계입니다. 대용량 파일은 SD카드나 FFAT 파일시스템을 통해 스트리밍 방식으로 처리하면 RAM 소비를 줄일 수 있습니다. SMTP 서버 측 첨부파일 크기 제한(Gmail 기준 25MB)도 함께 고려해야 합니다.



Summary

EMailSender is an open-source Arduino library that enables SMTP email transmission across major embedded platforms including Arduino, ESP32, and STM32. Paired with the WIZnet W5500 Ethernet controller, it offloads TCP/IP processing to dedicated hardware — keeping MCU resources free while delivering reliable, wired email alerts. This combination is especially compelling in industrial environments where WiFi is unstable or unavailable.


Overview

Once an IoT device is deployed in the field, one of the first capabilities you need is fault notification. Temperature threshold breaches, equipment errors, intrusion events — email remains the most universal and dependable channel for delivering these alerts to the right people in real time.

The challenge is implementation. Establishing an SMTP connection directly from an MCU, handling authentication, assembling MIME-formatted messages, and Base64-encoding attachments is far from trivial. Add Gmail's tightened security policies — mandatory App Passwords and STARTTLS requirements — and the complexity increases further.

EMailSender abstracts all of that complexity behind a single API. And when you place a W5500 at the network layer, TCP/IP processing moves entirely to hardware, freeing the MCU to focus on email assembly and application logic.


EMailSender Library Overview

EMailSender is an open-source library developed by Renzo Mischianti, currently at v4.1.3 (as of January 2026). It is available through both Arduino IDE and PlatformIO, distributed under the MIT license.

Platform and Feature Matrix

PlatformWiFiEthernetSSL/TLSSTARTTLS
ESP32
ESP8266
Arduino UNO/Mega
Arduino SAMD
STM32
Raspberry Pi Pico W

Supported Network Interfaces

  • WiFiClient / WiFiClientSecure (ESP32, ESP8266)
  • WiFiNINA (Arduino SAMD)
  • Ethernet W5100 / W5200 / W5500 (WIZnet)
  • UIPEthernet (ENC28J60)
  • SSLClient wrapper (for secure connections over wired Ethernet)

Supported Storage (for attachments)

  • Internal Flash: SPIFFS, LittleFS, FFAT (ESP32/ESP8266)
  • External SD card: SD, SdFat v1/v2
  • Stream / String direct attachment (v4.1.0 and above)

Secure Connection Options

  • STARTTLS (Port 587): Starts as plaintext, upgrades to encrypted. Required for modern Gmail
  • Implicit SSL/TLS (Port 465): Encrypted from the first byte. Preferred by some enterprise mail servers
  • Unencrypted SMTP (Port 25): For RAM-constrained platforms such as Arduino UNO/Mega only

Platform Comparison

EMailSender runs on a single codebase, but your choice of MCU and network interface significantly affects what is possible.

ConfigurationNetworkSSL SupportKey Characteristics
ESP32 + WiFiWirelessFast prototyping, built-in WiFi
ESP32 + W5500WiredLong-term industrial stability, no RF interference
ESP8266 + WiFiWirelessLow cost, watch RAM usage
STM32 + W5500WiredNo built-in WiFi, BearSSL integration
Arduino Mega + W5500Wired8KB RAM limit, unencrypted SMTP only
Arduino UNO + W5500Wired2KB RAM limit, minimal alert use cases

ESP32: Built-in WiFi makes it the go-to choice for rapid prototyping. However, in factory floors, underground equipment rooms, or RF-noisy environments, WiFi connections can degrade or drop during long-term unattended operation. Adding a W5500 gives ESP32 the stability of wired Ethernet without sacrificing its processing power or SSL support.

STM32: No built-in wireless interface, making Ethernet the only viable network path. W5500 connects via SPI and, combined with a BearSSL-based SSLClient wrapper, supports full SSL/TLS encrypted email transmission. EMailSender's official documentation includes dedicated STM32 + W5500 tutorials — making this one of the most thoroughly validated configurations available.

Arduino UNO/Mega: W5500 Ethernet shields work, but the RAM constraints (2KB on UNO, 8KB on Mega) make BearSSL's minimum 24KB requirement impossible to meet. SSL/TLS is not supported on these platforms. Use unencrypted SMTP (Port 25) or route through a local SMTP relay server.


System Architecture

The MCU handles email assembly and encryption logic. W5500 processes the entire TCP/IP stack in hardware, independently of the MCU. The SPI interface connects the two, and all TCP connection management — establishment, maintenance, teardown — happens inside the W5500.


What W5500 Does in This Architecture

Email delivery is not simple data transfer. It involves SMTP handshaking, TCP connection management, TLS negotiation, and MIME data streaming. Where that processing happens determines system stability and MCU headroom.

W5500 vs. ENC28J60 (Software Stack)

ItemENC28J60W5500
TCP/IP ProcessingMCU softwareHardwired
MCU LoadHighLow
Code ComplexityRequires UIPEthernetStandard Ethernet library
StabilityDepends on software stack qualityHardware-level reliability
Simultaneous SocketsLimitedUp to 8
SSL IntegrationDifficultBearSSL SSLClient ready

W5500 vs. ESP32 Built-in WiFi Stack

ESP32's WiFi uses a software-based TCP/IP stack (lwIP). It works well for short-term projects and indoor environments, but shows limitations in long-term industrial deployments. W5500's hardwired TCP/IP stack is immune to RF interference and operates independently of the MCU, leaving ESP32's full processing capacity available for application logic.

SSL/TLS on STM32 + W5500

With STM32 + W5500, a BearSSL-based SSLClient wrapper layers TLS encryption on top of W5500's hardware TCP connection. W5500 handles the TCP layer in hardware; BearSSL handles the TLS layer above it. EMailSender links these two layers automatically — the user only needs to specify the SMTP server address and port.


Implementation Key Points

Library Installation

Search for "EMailSender" in the Arduino IDE Library Manager and install. For PlatformIO, add the following to platformio.ini:

lib_deps =
    xreef/EMailSender@^4.1.3

SMTP Configuration: STARTTLS vs. SSL/TLS

  • STARTTLS (Port 587): The default for Gmail and most modern SMTP servers. Supported on ESP32, STM32, and Arduino SAMD
  • Implicit SSL/TLS (Port 465): Full encryption from connection start. Preferred by some enterprise servers
  • Unencrypted (Port 25): For RAM-constrained platforms only. Use with a local SMTP relay

Gmail: Mandatory App Password Setup

Since 2022, Google has blocked standard account password access via SMTP. To use Gmail as your SMTP server, you must generate an App Password:

  • Google Account → Security → Enable 2-Step Verification
  • Generate an App Password (16 characters)
  • Use the App Password in your code instead of your regular password

ESP32 + W5500 SPI Configuration Example

#include <Ethernet.h>
#include <EMailSender.h>

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

EMailSender emailSend("your@gmail.com", "app_password",
                      "your@gmail.com", "Sender Name",
                      "smtp.gmail.com", 587);

void setup() {
    Ethernet.init(5);  // W5500 CS pin on ESP32
    Ethernet.begin(mac);

    EMailSender::EMailMessage message;
    message.subject = "Sensor Alert";
    message.message = "Temperature exceeded threshold.";

    emailSend.send("admin@example.com", message);
}

STM32 + W5500 SSL Notes

  • Install the SSLClient (BearSSL) library separately
  • Verify SSL-related defines in EMailSenderKey.h
  • Check available Flash size before building — BearSSL increases binary size significantly

Arduino UNO/Mega: Working Around RAM Limits

  • Local SMTP relay: Deploy a lightweight relay (e.g., Postfix) on the internal network. Arduino sends unencrypted to the relay; the relay handles SSL to the outside
  • Minimize message size: Disable attachments, keep body text short
  • Consider platform migration: If security is required, migrate to ESP32 or STM32

Use Cases

Industrial Fault Detection (STM32 + W5500)

Connect an STM32 to CNC equipment on the factory floor and access the corporate LAN via W5500. When a fault code is detected, EMailSender immediately dispatches an alert to the responsible engineer. Wired Ethernet delivers reliable notifications even inside metal enclosures where WiFi cannot reach.

Remote Environment Monitoring (ESP32 + W5500)

In agricultural greenhouses, data center HVAC systems, and other 24/7 unattended environments, ESP32 + W5500 eliminates the WiFi reconnection issues that plague long-term deployments. When temperature or humidity exceeds a threshold, the system sends an email alert with a sensor log file attached.

Access Control Event Logging (ESP32 + W5500 + SD Card)

Integrate ESP32 + W5500 into an RFID access control system. On unauthorized access attempts, the system automatically emails security personnel with event logs — and optionally captured images when paired with a camera module.

Small Factory Monitoring (Arduino Mega + W5500)

For small manufacturing operations where a PLC is cost-prohibitive, Arduino Mega + W5500 provides a practical alerting system. SSL is not available on this platform, but routing through an on-premise SMTP relay server satisfies security requirements while keeping BOM costs low.


Limitations and Future Improvements

EMailSender + W5500 is a practical, well-validated configuration. That said, understanding its constraints before deployment will save significant troubleshooting time.

Current Limitations

  • No SSL on Arduino UNO/Mega: RAM constraints (2KB–8KB) make BearSSL inoperable. Even with W5500, encrypted email is not supported on these platforms
  • No local queue: Emails are lost if the network is unavailable at send time. Retry logic must be implemented at the application level
  • Single SMTP connection: Simultaneous multi-recipient batching is not supported — messages are sent sequentially
  • External SMTP dependency: Policy changes from Gmail and other providers (App Passwords, OAuth migration) require ongoing attention

Future Improvements

  • Local SMTP relay (e.g., Postfix): A lightweight relay on the internal network enables SSL-secured delivery even from Arduino UNO/Mega, and provides built-in queuing
  • PoE integration: Adding Power over Ethernet to a W5500-based wired setup consolidates power and network into a single cable, dramatically simplifying field wiring. WIZnet's PoE-capable modules make this achievable without a separate power adapter
  • Application-level retry logic: On send failure, write the message to SD card or Flash and retry when the network recovers
  • Platform migration: For environments requiring both security and stability, migrating from Arduino Mega to ESP32 + W5500 or STM32 + W5500 is the recommended path

FAQ

Q. When should I use W5500 instead of ESP32's built-in WiFi?

When operating in RF-noisy factory environments, underground equipment rooms, or any scenario requiring 24/7 unattended reliability. WiFi connections can drop due to AP restarts, authentication expiry, or interference. A W5500 wired connection eliminates these variables entirely.

Q. Can Arduino UNO send emails with W5500?

Yes, but without SSL/TLS. The 2KB RAM limit makes BearSSL impossible to run. Use unencrypted SMTP (Port 25) or route through a local SMTP relay. If security is a requirement, migrate to STM32 or ESP32.

Q. Does it work with SMTP servers other than Gmail?

Yes. EMailSender allows full configuration of SMTP server address, port, and authentication method. It is compatible with Outlook, Yahoo, on-premise Exchange servers, and any standard SMTP server.

Q. How do I choose between STARTTLS and SSL/TLS?

Default to STARTTLS (Port 587) for Gmail and most modern SMTP servers. Use Implicit SSL (Port 465) if your enterprise mail server requires it. Always check your SMTP server's documentation first.

Q. Are there attachment size limits?

The practical limit is your MCU's available RAM and Flash, not the library itself. For large files, use SD card or FFAT filesystem with streaming to minimize RAM consumption. Also account for your SMTP server's limit — Gmail caps attachments at 25MB.

Documents
Comments Write