Open Link URL and Send Email from Unity-New Tab

Most of game developers want players to see their site,credits,team and portfolio, unity send email .. and want feedback by sending e mails.open link in new tab Today we are giving some ways to open links and send and email from unity... unity open url from android game...


Opening URL and send Email from Unity


Most of game developers want players to see their site,credits,team and portfolio, and want feedback by sending e mails.
Today we are giving some ways to open links URL in unityscr and send email from unity,



URL Open:


if(GUILayout.Button("Visit Web Site"))
{
 Application.OpenURL("https://unity3diy.blogspot.com");
}

Or Create and attach this java script code to any object you want to click,

var links : String = "Paste your links here...";
function OnMouseDown(){
 Application.OpenURL(links);
}



URL Open In New Tab:


Application.ExternalEval("window.open('http://www.google.com','_blank')");


Reference
http://www.w3.org/TR/2004/WD-css3-hyperlinks-20040224/#target-new



Sending email:

void SendEmail ()

    {

    string email = "MY EMAIL ADDRESS";

    string subject = MyEscapeURL("My Subject");

    string body = MyEscapeURL("My Body\r\nFull of non-escaped chars");
     

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

    }  

    string MyEscapeURL (string url)

    {

    return WWW.EscapeURL(url).Replace("+","%20");

    }



Another C# example

Must check that under player settings Api Compatibility Level is set to ".NET 2.0" and not ".NET 2.0 Subset"
otherwise it doesn't work


         using UnityEngine;
    using System.Collections;

    using System;

    using System.Net;

    using System.Net.Mail;

    using System.Net.Security;

    using System.Security.Cryptography.X509Certificates;

     

    public class mono_gmail : MonoBehaviour {

     

    void Main ()

    {

    MailMessage mail = new MailMessage();

     

    mail.From = new MailAddress("youraddress@gmail.com");

    mail.To.Add("youraddress@gmail.com");

    mail.Subject = "Test Mail";

    mail.Body = "This is for testing SMTP mail from GMAIL";

     

    SmtpClient smtpServer = new SmtpClient("smtp.gmail.com");

    smtpServer.Port = 587;

    smtpServer.Credentials = new System.Net.NetworkCredential("youraddress@gmail.com", "yourpassword") as ICredentialsByHost;

    smtpServer.EnableSsl = true;

    ServicePointManager.ServerCertificateValidationCallback =

    delegate(object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)

    { return true; };

    smtpServer.Send(mail);

    Debug.Log("success");

     

    }

}






If you like and never wants to miss our articles then just subscribe us,
And join our Facebook group with Lots of great developers.

COMMENTS

FREE$type=three$author=hide$comment=hide$readmore=hide

$type=carousel$cols=3$count=9

Name

2014 2016 2d concave Collider 3d 3D Interactive Sandbox 3d scanning activations Adcolony admob Alternative app stores alternatives Amazon AMD analytics android angrybirds APK App App Review apple as ASO Assets augmented reality AVPro QuickTime beginner behind the scene BigMiniGolf Bravo Storm Beta bugfix Buy c# camera Cardboard CGTrader China chrome chromebook clash of clans Collaboration collider colors converter companies contest Cpi CrossyRoad DEPENDENCY INJECTION Downloads drawcalls dropbox EA error Error building Player facebookdevelopers facebookUnitySDK Failed flapflap Flappybird flapybird Fog free free post future game Game Companies game design document template Games gamestory GIMP git github GLOBAL GAME JAM 2015 Google Google Daydream Google play store googledevelopers graphics Guides Hacknslash Headless Mode Health Heroku How to Code HowTo Income India indie Indie teams infographics information Intel iOS iPhone Issues javascript jdk installation keyboardshortcuts Language learn Level Eleven license error Linux List madebyunity madewithunity mo mobile mobogenie monetize mouse tricks Must news to know NullReferenceException Object oculus Official open beta open source optimization Paint.net performance permission PKBhaag plugins Pokemon Go polijoy production Profitable programmer Promote Your App psd Publish realsense reddit release render settings reskin Resources Russia scripts SDK SHADERS Similar skybox Slender soomla Source Codes SourceCodes sponsored post Sprites Staff Pick strategies textures Tilt Brush tools tricks Tutorial Unable to find unite 2013 unity Unity 2d Pathfinding unity 2d water Unity AdMob Plugin Unity Forum unity timer unity web player Unity Windows 10 Crash Unity2d unity4.6 unity5 useful apps Version virtal reality Virtual Reality Visual Studio vouchers voxel VR webplyer win windows wordpress
false
ltr
item
Unity 3d Tutorials: Open Link URL and Send Email from Unity-New Tab
Open Link URL and Send Email from Unity-New Tab
Most of game developers want players to see their site,credits,team and portfolio, unity send email .. and want feedback by sending e mails.open link in new tab Today we are giving some ways to open links and send and email from unity... unity open url from android game...
http://2.bp.blogspot.com/-MbzrseH8qm8/U5D3yj7zVCI/AAAAAAAAAxE/RRBuc7dYlkk/s1600/unity+link.PNG
http://2.bp.blogspot.com/-MbzrseH8qm8/U5D3yj7zVCI/AAAAAAAAAxE/RRBuc7dYlkk/s72-c/unity+link.PNG
Unity 3d Tutorials
http://unity3diy.blogspot.com/2014/06/opening-url-and-send-email-from-unity.html
http://unity3diy.blogspot.com/
http://unity3diy.blogspot.com/
http://unity3diy.blogspot.com/2014/06/opening-url-and-send-email-from-unity.html
true
8957287156628097350
UTF-8
Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy