Wiznet makers

irina

Published April 01, 2024 ©

91 UCC

4 WCC

86 VAR

0 Contests

0 Followers

0 Following

Original Link

STM32 send emails with attachments and SSL (like Gmail): w5500, enc28j60, SD, and SPI Flash

The description seems to outline a guide on how to send emails using SSL for secure communication, similar to Gmail, and incorporates hardware such as the W5500

COMPONENTS Hardware components

Arduino - Arduino Ethernet Shield 2

x 1


PROJECT DESCRIPTION

 

This blog story will guide readers through the process of sending SSL-secured emails via Gmail 

using the STM32F4 microcontroller and the W5500 Ethernet module.

 It starts with setting up the necessary libraries and configuring SSLClient, then moves on to Ethernet connectivity and buffer extension. 

The story includes managing and sending email attachments from SD cards and SPI flash, and it details how to enable Gmail SMTP provider for use with SSL. 

The narrative provides wiring instructions for STM32F4 Black-pill, W5500, and ENC28J60 hardware, along with sketch examples, offering readers practical guidance for implementing their projects.

 

The provided text describes the Simple Mail Transfer Protocol (SMTP), a protocol for sending email that was standardized in 1982 and updated in 2008 to include Extended SMTP. It's widely used by mail servers and message transfer agents to send and receive messages. While some systems may use proprietary protocols internally, SMTP is used universally for email communication with external systems. SMTP typically operates over TCP port 25.

 

To read the article “STM32: ethernet w5500 with plain (HTTP) and SSL (HTTPS)” for a better understanding.

Retrieve certificate


The provided text explains that while a default Gmail certificate is pre-loaded for SSL communication, users have the option to use certificates from other SSL providers. 

To do this, they must retrieve the server certificate. SSLClient utilizes a feature from BearSSL that allows for the use of Trust Anchors for minimal x509 verification. 

Additionally, there's mention of a simple online generator that can be used to generate the necessary code by entering the site's address, which then should be copied into a file named trust_anchors.h.

 

Caution


First, visit the Gmail security settings page and enable two-factor authentication.: https://myaccount.google.com/security

 After that, create an application-specific password. 

This password, a 16-character string, will replace your usual SMTP Gmail account password for added security.

 

Related Link

 

Documents
Comments Write