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

[code]

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”)
[/code] [import]uid: 7863 topic_id: 8831 reply_id: 308831[/import]

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

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 )  
  

Would be nice not to display the URL and instead have it as a hyperlink but it is late and I don’t think my brain is capable of working out how to do that [import]uid: 7863 topic_id: 8831 reply_id: 32157[/import]

I personally haven’t tried this, but it’s something you might want to–

Did you try embedding an html tag for hyperlinks?

[blockcode]
Download Game
[/blockcode]

Would be nice to see if that works. I know not everyone has html email enabled, but I think the iPhone supports it by default…

[import]uid: 52430 topic_id: 8831 reply_id: 32205[/import]

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.
[import]uid: 8970 topic_id: 8831 reply_id: 32515[/import]

@f2cx: Very useful resource, thank you. [import]uid: 52430 topic_id: 8831 reply_id: 32554[/import]

Thanks @f2cx

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

  
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 )  

The resulting email was as follows:

  
I just got a score of 2345 in Ball Frenzy. I bet you can't beat my score.  
  
Download Ball Frenzy from the app store Mediakitchen  
  

I am thinking this email is plain text so perhaps it is not possible to have html tags in it? [import]uid: 7863 topic_id: 8831 reply_id: 32610[/import]