Place to put your Basic demos and examples

Moderator: Mmiscool

User avatar
By stern0m1
#42638 I am interest in an example that sends email. I tried the following but the email doesn't get sent.
body = "my first email from esp8266"
server = "mail.smtp2go.com"
port = 2525
user = "xxxxxxxxx"
password = "xxxxxxx"
sendto ="xxxxxxxxxx"
sendfrom ="xxxxxxxx"
mess = "Email test"

setupemail server port user password
button "Send Email" [SendEmail]
button "Exit " [getout]
wait
[SendEmail]
email sendto sendfrom mess body
wait
[getout]
end
User avatar
By Mmiscool
#42653 Looks like you were missing a couple of spaces.

When you are setting a variable you must have a space on both sides of the = sign.

Code: Select allbody = "my first email from esp8266"
server = "mail.smtp2go.com"
port = 2525
user = "xxxxxxxxx"
password = "xxxxxxx"
sendto = "xxxxxxxxxx"
sendfrom = "xxxxxxxx"
mess = "Email test"

setupemail server port user password
button "Send Email" [SendEmail]
button "Exit " [getout]
wait
[SendEmail]
email sendto sendfrom mess body
wait
[getout]
end
User avatar
By Mmiscool
#42654 The thread for the original feature request is here.
viewtopic.php?f=43&t=6615
User avatar
By stern0m1
#42667 Thanks!
That helped.

It was working but now it stopped. The serial port says connection failed.
Any ideas will be greatly appreciated. Thanks