How can I send an email when I tap a button? [import]uid: 27760 topic_id: 25778 reply_id: 325778[/import]
See here; http://developer.anscamobile.com/reference/index/nativeshowpopup
Has full example.
Email wont just send - it will open pre-populated email and user must then press send.
Peach
[import]uid: 52491 topic_id: 25778 reply_id: 104241[/import]
So do I have to do something like this:
[code]
local background=display.newImage(“background.png”)
local like=display.newImage(“like.png”)
local function sendEmail(event)
if (event.phase==“ended”) then
local options =
{
to = “mdvgames@hotmail.com”,
subject = “Like”,
body = “I like this game!!!”,
attachment = { baseDir=system.DocumentsDirectory, filename=“like.png”, type=“image” },
}
native.showPopup(“mail”, options)
end
end
like:addEventListener(“touch”, sendEmail)
[/code] [import]uid: 27760 topic_id: 25778 reply_id: 104247[/import]
Yes. You could also use “tap” rather than “touch” if you don’t want to specify an event phase for your button. [import]uid: 52491 topic_id: 25778 reply_id: 104374[/import]