Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Email Form with photo

Discussion in 'Editor & General Support' started by pakmafia, Oct 10, 2016.

  1. pakmafia

    pakmafia

    Joined:
    Feb 24, 2011
    Posts:
    43
    Hi have been searching on unity forms for weeks but i havnt been able to find the solution to my problem.
    I want to allow user to send me email form with 2 photos.
    I can create the ui buttons and text field but I cannot figure out how to send this information to my email address.
    UI Buttons:
    1. When click on Photo1(file browser) should allow user to browse the photos libary and choose photo 1 from their device
    2. When click on Photo2(file browser) should allow user to browse the photos libary and choose photo 2 from their device.
    3 Text Input should allow user to enter short message.
    4 Email Address - Should allow user to add their email address.
    5. Send button must collect all the data above and send it to my email address (Gmail)

    I really appritiate any help please.

     
  2. wccrawford

    wccrawford

    Joined:
    Sep 30, 2011
    Posts:
    2,039
  3. pakmafia

    pakmafia

    Joined:
    Feb 24, 2011
    Posts:
    43
    It solves partial problem. If you can guide me on will the send button gather all the information and send to me email? Thanks
     
  4. wccrawford

    wccrawford

    Joined:
    Sep 30, 2011
    Posts:
    2,039
    So far as I know, there's no way to send an email directly from Unity. You need to have a webserver somewhere to upload the information to, and have it send the email.
     
    Kiwasi likes this.
  5. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,301
    You need to access a email server and talk to it via one of the email protocols from within unity.

    A simple option would be to have a web form that handles email sending somewhere, then submit data to that form from within unity using WWW or WWWForm classes.
    https://docs.unity3d.com/ScriptReference/WWW.html
    https://docs.unity3d.com/ScriptReference/WWWForm.html
    Either way you'll need a server + website + domain for it to work.
     
    Kiwasi likes this.
  6. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,797
    Look at Mandrill? They have a REST API for sending email.