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
0
Question by randombinaries · Apr 10, 2012 at 08:39 PM · javascriptstringemail

Sending a string via email from Unity?

Is there a way to send a predefined message from within Unity via email? What I want to do is send the information that is defined and stored as a string within Unity to a email account as soon as the game has reached the end. This is so that I can have records of the metrics I want to record. I know you can send a email from within Unity because the following link has something on this matter:

http://answers.unity3d.com/questions/63412/sending-mobile-email-via-unity.html

Can you please provide me with sample code in Javascript to explain your solution to my problem. Thank you for your help.

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by ExTheSea · Apr 10, 2012 at 09:36 PM

It's not Javascript but i hope these links helps:

http://www.daveoncsharp.com/2009/07/send-email-from-your-gmail-account-using-csharp/

and

http://answers.unity3d.com/questions/46752/unity-3-sending-email-with-c.html

Comment
Add comment · Show 3 · 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 randombinaries · Apr 11, 2012 at 07:22 PM 0
Share

Thanks for your response but what I wanted was a solution in Javascript not C#. As a majority of my game is in Javascript.

avatar image JayMHelpsU · Apr 11, 2012 at 07:56 PM 0
Share

Honestly Javascript propbably couldnt do it on its own but if you had an external library it might :/ The only option is to use C# as suggested by ExTheSea Hope this helps :)

avatar image Eric5h5 · Apr 11, 2012 at 08:02 PM 0
Share

All of .NET (or rather, $$anonymous$$ono) is available for JS, so C# is not the only option. People seem to have a tendency to conflate .NET with C#, but they are separate things. You could try the example code and convert it to JS, though I don't know that those particular functions are actually included with $$anonymous$$ono, or the $$anonymous$$ono that Unity uses. It's entirely possibly that they are, but typically the more "esoteric" stuff isn't.

avatar image
0

Answer by xandermacleod · Jun 20, 2012 at 10:19 AM

Oops! Ok, just looked online and noticed I needed to include the 'using System.Net.Mail;' and the 'using System.Net'.

Nevermind!

However I am facing a new issue now. The game now takes ages to startup, and eventually comes up with an error saying:


SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP, Boolean requireSocketPolicy) System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) System.Net.Sockets.TcpClient.Connect (System.Net.IPEndPoint remote_end_point) System.Net.Sockets.TcpClient.Connect (System.Net.IPAddress[] ipAddresses, Int32 port) Rethrow as SmtpException: Message could not be sent. System.Net.Mail.SmtpClient.Send (System.Net.Mail.MailMessage message) Email.SendEmail () (at Assets/Standard Assets/Email.cs:48)


any ideas?

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

7 People are following this question.

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

Related Questions

How to measure ad impressions in In-Game Ads? 0 Answers

How can i split a string[] ? 1 Answer

Accuracy doesn't work. No enemies showing up. 1 Answer

How to create dynamic array of type GameObject using javascript? 2 Answers

How do you display a saved name on the screen? 2 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