element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs Send an Email from ESP8266 - Important Update
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: neilk
  • Date Created: 4 Feb 2021 2:08 PM Date Created
  • Views 1382 views
  • Likes 5 likes
  • Comments 2 comments
  • esp-8266
  • smtp2go
  • email
Related
Recommended

Send an Email from ESP8266 - Important Update

neilk
neilk
4 Feb 2021

The Problem

 

A few days ago I discovered that the battery powered, ESP8266 based temperature monitor in one of my greenhouses had stopped transmitting data ti my local web server. When I investigated further, I found that the battery was flat.

 

This was a surprise, as I hadn't received any emails warning me that the battery voltage was low. The method I use has worked totally reliably since I first implemented it almost 2 years ago, as described here:

 

Send an Email from ESP8266

 

After switching on the battery charger, I returned to my current project, intending to look further into the email problem when I had more time.

 

Later the same day, I received an email from SMTP2GO, who provide the email forwarding service, as described in my earlier blog. The essence of their message was that the emails from my temperature monitor were bouncing because I was sending from a mymail.com address and that mymail.com has an SPF record that prohibits sending from servers outside their own network. Their advice was to use a genuine email address either from live.com or outlook.com, but to avoid AOL and Yahoo addresses.

 

I was a bit confused by all this, because the system had been working perfectly for the past 2 years, and the last time emails had been successfully sent was only 2 weeks ago (the typical life of the battery). I exchanged a few emails with SMTP2GO support team in order to clarify the situation and here is the (simple) solution:

 

 

The Solution

 

In the code snippets of my original post, I gave the following lines of code:

 

client.println(F("MAIL From: yrmail@gmail.com")); // Not a real address

 

client.println(F("From: yrmail@gmail.com"));

 

Although this worked at the time, for some reason which I can't remember, I switched to an imaginary address using mymail.com.

 

In order to comply with the advice from SMTP2GO, I registered a suitable address with outlook.com.

 

I then modified a test sketch, which just sends a test email, to use the new address. This worked, so I emailed SMTP2GO to let them know.

 

I received a fairy quick reply to tell me that everything was now OK.

 

Phew

  • Sign in to reply
  • neilk
    neilk over 2 years ago in reply to Tehkel

    See my original post for full details.

    Some of the suggestions that others have made may well prove easier to implement than mine - over 2 years old!!

    Good luck

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Tehkel
    Tehkel over 2 years ago

    Hey Neil. Pls I am working on a school project, it is a smart delivery box that helps to keep hot foods meant for delivery warm.

    The box has two sensors for checking temperature and monitor within the range of 135°F to 165°F. The box will have a smart lock system that generates a random pass word relays it to the microcontroller in this an Esp8266 and then the controller sends the password to the same or another email.

    The receiver can now input the password to open the box when the order arrives 

    This is my first project and I don't know what to do.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube