-->
Page 1 of 3

send email example

PostPosted: Mon Mar 07, 2016 2:48 pm
by stern0m1
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

Re: send email example

PostPosted: Mon Mar 07, 2016 6:51 pm
by Mmiscool
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

Re: send email example

PostPosted: Mon Mar 07, 2016 6:59 pm
by Mmiscool
The thread for the original feature request is here.
viewtopic.php?f=43&t=6615

Re: send email example

PostPosted: Tue Mar 08, 2016 12:12 am
by stern0m1
Thanks!
That helped.

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