0

Hi I am wondering is there a way of sending the user an email (from my Gmail address) with results of calculations that occurs within the app itself?

For example a form is filled out with values for electricity rates and these rates are then computed and processed into information on savings for a particular product.

What I have is a custom alert box popup with the results and a button saying email me the results and then a EditText becomes visible below asking for the email address of the user.

Is this possible or would a simple notification be easier to do?

M_K
  • 3,247
  • 6
  • 30
  • 47
  • 1
    Do you want to automatically send mail or open "new mail" pre filled form in the gmail app? – David Olsson Sep 26 '11 at 22:19
  • I would like to automatically send the mail but with the results the user entered into the form. I would prefer to do this without gmail app opening. – M_K Sep 27 '11 at 00:07

1 Answers1

1

You could do it via a form or by using the JavaMail API or you could use an existing email client from the phone.

Community
  • 1
  • 1
Andrei
  • 2,607
  • 1
  • 23
  • 26
  • Thanks I just used the third link to send an email from my own email client to myself, is there any way of doing this without gmail opening? – M_K Sep 27 '11 at 00:05
  • Glad the links helped. If you use the example the second link you could do that. Have a look at [this JavaMail Project](http://code.google.com/p/javamail-android/). There is also a blog post [here](http://www.jondev.net/articles/Sending_Emails_without_User_Intervention_(no_Intents)_in_Android), which goes into a bit more detail on how to implement what you want, using the JavaMail library. – Andrei Sep 27 '11 at 21:12