Send Email From Unity – Simple Email System

How to Send email from unity? Don’t know? It’s too easy. Many multiplayer games from unity use email features to improve its stability, robustness and bug fixes. 

send Email from unity

User’s Feedback or Suggestions are very important nowadays.Most of the game developers want their user to see them in a portfolio and share their experience with the development team.

Email is the best thing to share user experience with the development team.Now, the question is How to send email from unity?We can display our email address to the user, but do we get feedback by just displaying email address?The answer is, what can we do to get regular feedback from a user? Do something that user easily send email regularly without interrupts their actual game play.

Is it possible to send email from unity by just one click? Yes, It is.You can do this by this two methods.

  1. Open default app and send mail.
  2. Send email using SMTP server.

Here’s How you can do using default email app in mobile phones.

  • Send Email using default App

      1.Create an empty unity project.

      2.Create a Scripts called MailSender.cs

      3.Create a function called SendEmail in Mailsender Class.

      4.Copy and paste following code into the SendEmail function.

      5.Create a button in unity and set on click listener with the SendMail functions.Don’t forget to set your email address.

      6. Build and Run.

  • Send email using SMTP server

    Send Email using SMTP is really simple and you can do it in unity using System.Net.Mail library.

1. Create an Empty Unity project

2. Create script called SmtpMailSender.cs

3. Create a function inside the class called SendSmtpMail.

4. Copy and paste following code into the SendSmtpMail function.

5.Resolve other library dependencies.

Note: Set API Compatibility Level to “.NET 2.0” and not “.NET 2.0 Subset” in build setting.

Get more helpful asset:

14 thoughts on “Send Email From Unity – Simple Email System”

  1. This design is steller! You obviously know how to
    keep a reader amused. Between yourr wit and your videos, I was almost moved to start
    my ownn blog (well, almost…HaHa!) Fantastic job. I really enjoyed what you had to say,
    aand more than that, how you presented it. Too cool!

  2. This is a very good tip particularly to those fresh to the
    blogosphere. Simple but very accurate info… Thank you for sharing
    tthis one. A must read article!

  3. Excellent web site you have here.. It’s difficult too fond high quality writing
    like yours these days. I honestly appreciate people like you!
    Take care!!

  4. Hi there very cool website!! Guyy .. Excellent ..

    Superb .. I will bookmark your blog and take the feeds additionally?
    I’m glad to seeek out so many useful info here in the publish,
    we need develop more techniques in this regard, thanks for sharing.
    . . . . .

  5. I doo not even know how I ended up here, but I thought
    this post wwas good. I do not know whoo yoou are but definitely you’re going to a ffamous blogger if you are not alreadfy 😉 Cheers!

Leave a Reply

Your email address will not be published. Required fields are marked *