Hey gang,
I want to have the user enter information in my app and then click an button and generate an e-mail in their e-mail client to send to me. So I’m trying to format an e-mail using a URL and then the ShowURL command. Is this the best way to do this? Here’s my code:
Dim MailURL as string = "<a href=""mailto:registration@justaddsoftware.net?"+ _
"subject=InstallerPro3%20Registration%20Request%20For%20"+NameString.Text+"%20@%20"+EmailString.Text+ _
"&body="+NameString.Text+"%20with%20e-mail%20address%20"+self.EmailString.Text+"%20"+ _
"has%20requested%20a%20license%20key%20for%20InstallerPro%203.%0A%0A"+ _
"Here%20is%20the%20registration%20information%3A%20%0A%0A"+ _
"Name%3A%20%20"+self.NameString.Text+"%0A"+ _
"E-Mail%3A%20%20"+self.EmailString.Text+"%20%20%0A%0A%20%20"">Send mail</a>"
ShowURL(MailURL)
I have tested the MailURL string at http://www.rapidtables.com/web/html/mailto.htm and it works. But it doesn’t work in Xojo. Nothing happens.
If I I take out the HTML Tag information and make the string like this:
Dim MailURL as string = "mailto:registration@justaddsoftware.net?"+ _
"subject=InstallerPro3%20Registration%20Request%20For%20"+NameString.Text+"%20@%20"+EmailString.Text+ _
"&body="+NameString.Text+"%20with%20e-mail%20address%20"+self.EmailString.Text+"%20"+ _
"has%20requested%20a%20license%20key%20for%20InstallerPro%203.%0A%0A"+ _
"Here%20is%20the%20registration%20information%3A%20%0A%0A"+ _
"Name%3A%20%20"+self.NameString.Text+"%0A"+ _
"E-Mail%3A%20%20"+self.EmailString.Text+"%20%20%0A%0A%20%20"
Then Xojo does open the email client but the body never gets entered properly. Everything is on the subject line.
So what am I doing wrong? And is show URL the best way to do this? I had been generating an e-mail and using one of my own accounts to send the e-mail behind the scenes directly to me but that doesn’t always work correctly as firewalls and all can have issues with doing it that way.
Thanks,
Jon