Tagged: EmailSender with Gmail
- This topic has 4 replies, 2 voices, and was last updated 5 hours, 46 minutes ago by
Renzo Mischianti.
-
AuthorPosts
-
-
27 September 2025 at 11:37 #33365
Hello Renzo,
Since my Sendgrid account has become paid, I turned to Google. (I don’t send enough emails to be profitable).
On my Google account, I created an API key, but I can’t send an email.
I kept the same structure as for sending with Sendgrid.
But I can’t send the email.code :
#include <EMailSender.h>
#define DEFAULT_EMAIL_NETWORK_TYPE_ARDUINO NETWORK_W5100
#define EMAIL_SENDER_DEBUG
EMailSender.emailSend(“Arduino”, “aaaa bbbb cccc dddd”, “[email protected]”, “smtp.gmail.com”, 587);I tested with the names ‘Apikey’ and ‘Arduino’. Arduino is the name registered with the Google API.
I am testing several solutions, but I feel like I am missing something simple…The server response is: SMTP AUTH error (530 5.7.0
Do you have any idea what might be missing?
I am using a Mega2500 board.
Tank you -
1 October 2025 at 18:10 #33375
ok ok I understand now:
smtp.gmail.com requires a TLS/SSL connection and an App Password if you are using a Google account (2-step verification). The standard W5100 (Ethernet) shield does not support TLS/SSL, so it cannot connect directly to smtp.gmail.com over 465 (SSL) or perform STARTTLS over 587
So, I’ll look for another solution.
You can close this topic.
-
2 October 2025 at 16:33 #33409
Hi Jules,
You are right, I try to upgrade the EmailSender, but for Mega I think the requirements for 587 are too high.
Keep in touch.
Bye Renzo -
2 October 2025 at 16:40 #33410
Wait, for w5500 I do this work that I think can be suitable also for Mega
STM32 send emails with attachments and SSL (like Gmail): w5500, enc28j60, SD, and SPI Fash
Give me a feedback Renzo
-
4 October 2025 at 20:41 #33456
Hi Jules sorry for the late response,
However, I received some requests for this library, and I began to add extensive support. I developed and added numerous features. In the GitHub branch repository, you can find an updated version of the library (Beta version) that try to support SSL on port 465 also for AVR system.
If you can give me some feedback.Release v4.0.0: Add STARTTLS support and comprehensive documentation
Major Features:
– ✨ Add full STARTTLS support (port 587) for secure email transmission
– ✨ Integrate internal SSLClient for ESP32/ESP8266 STARTTLS connections
– ✨ Enhance authentication methods (AUTH LOGIN, PLAIN, CRAM-MD5)
– ✨ Add comprehensive English documentation with platform-specific tutorialsImprovements:
– 🔧 Unify client handling for better SSL/TLS compatibility
– 🔧 Improve EHLO/HELO command handling with multi-line response support
– 🔧 Enhance connection retry logic and error handling
– 🔧 Better memory management for large attachments
– 🔧 Add detailed SMTP response drain mechanismBug Fixes:
– 🐛 Fix SSLClient initialization and scope issues on ESP32
– 🐛 Fix STARTTLS upgrade sequence for proper SSL handshake
– 🐛 Correct BearSSL integration for Ethernet shields
– 🐛 Fix client reference handling in send() methodDocumentation:
– 📚 Add complete README.md with all features and examples
– 📚 Include links to mischianti.org tutorials for all platforms
– 📚 Add troubleshooting guide and Gmail configuration instructions
– 📚 Document API reference with all methods and data structures
– 📚 Add migration guide from v3.x to v4.0.0Breaking Changes:
– ⚠️ Minimum Arduino IDE version: 1.8.x
– ⚠️ ESP32 core minimum version: 2.0.x
– ⚠️ Some internal API changes (user-facing API remains compatible)Tested Platforms:
– ESP32 (WiFi + Ethernet with STARTTLS/SSL)
– ESP8266 (WiFi + Ethernet with STARTTLS/SSL)
– Arduino Mega (Ethernet with SSLClient)
– Arduino SAMD (WiFiNINA)
– STM32 (Ethernet with SSL)
– Raspberry Pi Pico W (WiFi + LittleFS)This release brings production-ready STARTTLS support making the library
compatible with modern SMTP servers requiring port 587 encryption, while
maintaining backward compatibility with implicit SSL on port 465.Bye Renzo
-
-
AuthorPosts
- You must be logged in to reply to this topic.