Send score by email from game

Trying to send a score from a game and can't figure out syntax. This is what I am trying but the variable is just displaying as text

1
2
3
local numHighscore = 32000
                                
system.openURL("mailto:paul@mediakitchen.co.uk?subject=Check%20out%20my%20score%20on%20Ball%20Frenzy!&body=I%20just%20got%20a%20score%20of%20numHighscore")

Ok cool - I have worked this out by trial and error so here it is in case it is useful to others

1
2
3
4
5
local numHighscore = 32000
                                
local openMailUrl = "mailto:paul@mediakitchen.co.uksubject=Check%20out%20my%20score%20on%20Ball%20Frenzy!&body=I%20just%20got%20a%20score%20of%20" .. numHighscore .. "%20in%20Ball%20Frenzy.%20I%20bet%20you%20can't%20beat%20my%20score.%0A%0A" ..  "Download%20Ball%20Frenzy%20from%20the%20app%20store%20http://itunes.apple.com/app/id418034613"
 
system.openURL( openMailUrl )

I personally haven't tried this, but it's something you might want to--

Did you try embedding an html tag for hyperlinks?

1
<a href="http://YOURITUNESURL">Download Game</a>

A very helpfull link to share with all CoronaFans who want to send email:

http://www.w3schools.com/tags/ref_urlencode.asp

You have links between "ASCII Character" and "URL-encoding".
To get a correct synthax, you can also "copy and paste" a string to encode it (see "URL encode button") and then "copy and paste" the result in your code.

@f2cx: Very useful resource, thank you.

Thanks @f2cx

I gave this a go and my resulting code was the following where I just used my own website address for testing

1
2
local openMailUrl = "mailto:?subject=Check%20out%20my%20score%20on%20Ball%20Frenzy!&body=I%20just%20got%20a%20score%20of%20" .. numHighscore .. "%20in%20Ball%20Frenzy.%20I%20bet%20you%20can't%20beat%20my%20score.%0A%0A" ..  "Download%20Ball%20Frenzy%20from%20the%20app%20store%20%3Ca+href%3D%22http%3A%2F%2Fwww.mediakitchen.co.uk%22%3EMediakitchen%3C%2Fa%3E"
                                system.openURL( openMailUrl )
views:1624 update:2011/10/3 8:06:12
corona forums © 2003-2011