Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 22:42 17 Sep 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : sending email with esp8266

Author Message
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 09:19am 05 Dec 2015
Copy link to clipboard 
Print this post

The esp8266 with the basic port can easily send emails. This is a neat feature and I am trying to get some code to work on the uMite to read a few sensors and email them every once in a while. That part is still underway, but I wanted to share how easy it is to send an email. Mike from esp8266basic has done a bang up job with this port and keeps surprising me with some cool features. Anyway...

Here is the simple code I am using to send an email. I am using godaddy mail server as that is what I normally use at work. I am sure you can use most, but I see that gmail is not one of them.

memclear
body = "my first email from esp8266"
setupemail smtpout.secureserver.net 3535 jim@xxxxxxxx.com mypassword
button "Send Email" [SendEmail]
button "Exit " [getout]
wait
[SendEmail]
email jimbo@xxxxxxx.com jim@xxxxxxxxxxxx.com "Email test" body
wait
[getout]
end

This code works very well and can be expanded on greatly to make some cool stuff happen.

HERE is the reference from Mike.

The key for me right now is to get the esp to listen to the serial port and have the uMite spit out the sensor data and make it part of the "body" string.

Fun, fun, fun!
 
HankR
Senior Member

Joined: 02/01/2015
Location: United States
Posts: 209
Posted: 10:19am 05 Dec 2015
Copy link to clipboard 
Print this post

  viscomjim said  
Here is the simple code I am using to send an email. I am using godaddy mail server as that is what I normally use at work. I am sure you can use most, but I see that gmail is not one of them.


Jim,

Thanks for posting this code.

Right away I have some questions. How do you know gmail is not one of them?

Here is what I have for Yahoomail mail server characteristics. Can you tell at this stage of your learning if that type of server will work?

I have only just ordered the module you recommended or I would try it myself.

Hank


POP server settings for Yahoo Mail

POP lets you connect your Yahoo Mail account to a desktop mail client or mobile app.
It uses 1-way synching, which downloads your email as a copy into the app, allowing
you to move and delete them in the app without affecting the original emails.
Here are the settings you'll need to configure your mail client or app.


Incoming Mail (POP) Server

Server - pop.mail.yahoo.com
Port - 995
Requires SSL - Yes

Outgoing Mail (SMTP) Server

Server - smtp.mail.yahoo.com
Port - 465 or 587
Requires SSL - Yes
Requires TLS - Yes (if available)
Requires authentication - Yes

Your login info

Email address - Your full email address (name@domain.com.)
Password - Your account's password.
Requires authentication - Yes


 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 10:26am 05 Dec 2015
Copy link to clipboard 
Print this post

Hi Hank, I read about the gmail thing HERE

Read through this tread for more info. As far as Yahoo, I don't have an account, but in that same thread, reading some of the other users code, it looks like someone used yahoo in their examples. Do you have any esp modules? If so, I believe this will work on a esp-01(actually, any of them) if you have one.
 
HankR
Senior Member

Joined: 02/01/2015
Location: United States
Posts: 209
Posted: 11:11am 05 Dec 2015
Copy link to clipboard 
Print this post

  Quote  
Read through this tread for more info. As far as Yahoo, I don't have an account, but in that same thread, reading some of the other users code, it looks like someone used yahoo in their examples.


I missed that not being at all familiar with that forum system. Never would have seen beyond the first page of posts if you hadn't told me it was there.

  Quote  
Do you have any esp modules? If so, I believe this will work on a esp-01(actually, any of them) if you have one.


Have nothing. The Bangood one you like is on the way.

I wish that forum for the ESPBASIC were not as fragmented, but it looks like posts are sometimes posted in multiple areas which helps a little. Jim, have you noticed that?
 
HankR
Senior Member

Joined: 02/01/2015
Location: United States
Posts: 209
Posted: 11:14am 05 Dec 2015
Copy link to clipboard 
Print this post

  Quote  
I wish that forum for the ESPBASIC were not as fragmented, but it looks like posts are sometimes posted in multiple areas which helps a little. Jim, have you noticed that?


I meant "have you noticed the redundant posts to several different threads?"
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 01:19pm 05 Dec 2015
Copy link to clipboard 
Print this post

I did notice that. I kind of make notes of where I found things in the forum so I can find them easier, it is a bit fragmented for sure. But a great source of help also. The whole email thing was under "feature request" if I remember correctly.

Keep us posted when you get your modules and how you get on with them. I don't know if you noticed, but the banggood site sometimes has products that can ship from the US and the shipping is quite a bit faster, but you will pay a bit more for that.
 
MikeO
Senior Member

Joined: 11/09/2011
Location: Australia
Posts: 275
Posted: 12:19am 06 Dec 2015
Copy link to clipboard 
Print this post

Hi Jim, I have just posted some code on ESP Basic today for interfacing with a uMite, transfers 10 data fields and commands, currently sends emails , reads NTP time and requests setup info from ESP8266, I had some sync issues trying to send all the data individually probably due to the limited control you have with the ESPs INPUT command as it's blocking and will wait for ever if you have any data screw ups but in the end I used a single string and built a parse routine on the ESP to pull out the fields, which seems to be quite robust. Have a look may help you with your quest!
uMite to ESP8266
Codenquilts
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 02:47am 06 Dec 2015
Copy link to clipboard 
Print this post

Hello MikeO. This is really excellent!!!!!! I tip my hat to you. This will be a great start to making these two awesome units do some interesting and useful things. If you don't mind, I am going to start a new thread for this.

GREAT WORK!!!!

Can you post the uMite code that you are using to make this work. I would like to try it right away!

THANKS!!!!
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025