I have an esp-01 with LUA, (running a http server script I found here I believe) it boots and runs as a AP if no config is found, serving a web page to select your wifi and password. Then it reboots and runs a script that monitors a gpio and sends a string to an offsite webpage which sends an email. This all works great, my problem is when I try to add a box to save the email address to use. I can save to a file but nothing gets saved after the @ or . symbol. I have found a workaround by hardcoding them in the file, but I am sure there is a better way. Thanks for the help.
This is will not save special characters it seems.
file.open("config.lua","w")
file.writeline('ssid = "'.._GET.ap..'"')
file.writeline('password = "'.._GET.psw..'"')
file.writeline('email = "'.._GET.email..'"')
file.close()
This was the workaround I found
file.open("config.lua","w")
file.writeline('ssid = "'.._GET.ap..'"')
file.writeline('password = "'.._GET.psw..'"')
file.writeline('email = "'.._GET.email1..'@'.._GET.email2..'.'.._GET.email3..'"') -- 1=email, 2=domain, 3=com/org/net
file.close()