Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by moghes · Apr 22, 2014 at 01:04 PM · iosemailencodingopenurl

Can't send email from ios device when email body contains arabic characters!

Hello,

I want to send an email a string on an ios device. Here's the code:

 Application.OpenURL ("mailto: " + email + "?subject=" + subject + "&body=" + body);

when the body has arabic characters, the mail window does not even open! I tried displaying on the screen (using ngui label) and the text was printing on the screen.

Any hints please

Comment
Add comment · Show 5
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image chufraise · Apr 22, 2014 at 01:27 PM 0
Share

This is a wild shot, but have you tried escaping the characters? Reference

avatar image moghes · Apr 22, 2014 at 01:35 PM 0
Share

@chufraise yes I have!, here's the code.. thanks anyway :)

     void SendEmail ()
     {
         string email = "";
         string subject = $$anonymous$$yEscapeURL("");
         string body = $$anonymous$$yEscapeURL("");
 
         for(int i = 0 ; i<HighScore$$anonymous$$anager._instance.GetHighScore().Count;i++)
         {
             body += (HighScore$$anonymous$$anager._instance.GetHighScore()[i].name +","+HighScore$$anonymous$$anager._instance.GetHighScore()[i].telephone +"," + HighScore$$anonymous$$anager._instance.GetHighScore()[i].score +"," + HighScore$$anonymous$$anager._instance.GetHighScore()[i].email +$$anonymous$$yEscapeURL("\n"));
         }
 
 
         tempLabel.GetComponent<UILabel>().text = body;
 
         Application.OpenURL("mailto:" + email + "?subject=" + subject + "&body=" + body);
     }
     
     string $$anonymous$$yEscapeURL (string url)
     {
         return WWW.EscapeURL(url).Replace("+","%20");
     }
avatar image chufraise · Apr 22, 2014 at 01:48 PM 0
Share

Way ahead of me I see :)

Have you tried typing in a web dummy url with the same request params? Like:

 Application.OpenURL ("http://www.unity3d.com/?subject=" + subject + "&body=" + body);

Just to see if your web browser opens. If it doesn't maybe you can sniff the request using a proxy.

Just spitballin' here.

avatar image moghes · Apr 22, 2014 at 02:30 PM 0
Share

@chufraise again, same story.

everything going fine, and not when i have arabic charaters in the body. (window does not even open) .. strange

avatar image chufraise · Apr 22, 2014 at 02:43 PM 0
Share

Sorry for taking you out on this wild goose chase. I take it you're testing this in the Unity editor, any clues from the unity log?

Also, have you tried outputing the resulting escaped url in the console, and then copy/pasting it to the browser to see what happens?

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by NgenGames · Apr 30, 2018 at 09:28 AM

having the same issue did you got any solution to this? if yes plz share

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by hameed-ullah-jan · Apr 30, 2018 at 09:32 AM

Hello have got any solution to this, i have the same issue, can you share it plz

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

23 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How do I send an email on IOS using Application.OpenURL with more than one line of body text? 4 Answers

@ makes problem in ios 1 Answer

Open email popup on iOS 0 Answers

Launch an iOS app with options C# 0 Answers

iOS Loading Local PDF/HTML from StreamingAssets 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges