Email Not Send

Hello mate,

im tryin to send an email using native.showPopup, but the email is never sent, below is the code:

function scene:createScene( event ) function sendMail() local options = { to = "yourname@youremail.com", subject = "Game Result", isBodyHtml = true, body = "\<html\>\<body\>Play Time: \<b\>10\</b\> \<br\> Score: \<b\>1\</b\>\</body\>\</html\>" } native.showPopup("mail", options) end -- add some button to send mail submitBtn = widget.newButton{ defaultFile="assets/submit.png", over="assets/submit.png", width=display.contentWidth/2, height=display.contentHeight/6, onPress = sendMail } end scene:addEventListener( "createScene", scene ) return scene

and this is the build.settings:

settings = { android = { versionCode = "11", usesPermissions = { "android.permission.INTERNET", "android.permission.WRITE\_EXTERNAL\_STORAGE", "android.permission.ACCESS\_FINE\_LOCATION", "android.permission.ACCESS\_COARSE\_LOCATION", } }, }

i try in simulator and in my phone, but none is working, any one can help me?

thx

i dont know why, but i just add some validation and now its work…

here the revision code i made:

function sendMail() local options = { to = "yourname@youremail.com", subject = "Game Result", isBodyHtml = true, body = "\<html\>\<body\>Play Time: \<b\>10\</b\> \<br\> Score: \<b\>1\</b\>\</body\>\</html\>" } -- add some validation -- and this is revision code local mailSend = native.showPopup("mail", options) if not mailSend then native.showAlert( "Alert!", "Mail cannot be send.", { "OK" }) end end

thx

i dont know why, but i just add some validation and now its work…

here the revision code i made:

function sendMail() local options = { to = "yourname@youremail.com", subject = "Game Result", isBodyHtml = true, body = "\<html\>\<body\>Play Time: \<b\>10\</b\> \<br\> Score: \<b\>1\</b\>\</body\>\</html\>" } -- add some validation -- and this is revision code local mailSend = native.showPopup("mail", options) if not mailSend then native.showAlert( "Alert!", "Mail cannot be send.", { "OK" }) end end

thx