Hi Guys,
I’ve created code to compose an email, the issue i’m having is that once it has go to the default email client it works fine until I try to discard my email I have to discard it about 5-6 times so it makes me think that its trying to send it multiple times with my OnbtnSend function anyone have any ideas?
[lua]
local function OnbtnSend( event )
– compose an HTML email with two attachments
local options =
{
to = { “MobileDevelopmentTesting@gmail.com” },
subject = “Incident Report”,
isBodyHtml = true,
body = [[<html>
<body>
<p>Incident Date: ]] … myData.dateDay … " / " … myData.dateMonth … " / " … myData.dateYear … [[</p>
<p>Incident Time: ]] … myData.timeHour … " : " … myData.timeMinute … [[</p>
</body>
</html>]] }
local result = native.showPopup(“mail”, options)
if not result then
print( “Mail Not supported/setup on this device” )
native.showAlert( “Warning!”,
“ERROR: Mail not supported/setup on this device. Contact Support”, { “OK” }
);
end
– NOTE: options table (and all child properties) are optional
end
[/lua]