-1

I need to send an email from the user's synced account.

I saw this example:

Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/html");
intent.putExtra(Intent.EXTRA_EMAIL, "emailaddress@emailaddress.com");
intent.putExtra(Intent.EXTRA_SUBJECT, "Subject");
intent.putExtra(Intent.EXTRA_TEXT, "I'm email body.");

startActivity(Intent.createChooser(intent, "Send Email"));

But I dont want to use google's aplication, I want to create my own activity to do this.

I can't find any reffernce on how this could be done.

Alternativly if anyone knows how can i get a result(did the user send the mail?) from google's application, that can also solve my problem.

susparsy
  • 1,016
  • 5
  • 22
  • 38

1 Answers1

0

It sounds like you want to have full control over the email sending process. To do this you would need to communicate with the mail server yourself instead of passing control to another app.

Maybe this link will point you in the right direction.

http://mobiledevtuts.com/android/android-sdk-smtp-email-tutorial/

Kuffs
  • 35,581
  • 10
  • 79
  • 92
  • I know how to send an email.. but my problem is that i dont want the user to enter his password as i wrote – susparsy Jan 13 '14 at 10:15
  • I cannot see where you specified that you did not want the user to enter a password. I only see that you specified that you did not want to use the built in app. If that is the case then what you are asking is not possible. – Kuffs Jan 13 '14 at 10:19
  • Your "alternatively" option has been asked before. http://stackoverflow.com/questions/3600149/get-mail-sent-notification-in-onactivityresult-android – Kuffs Jan 13 '14 at 10:20
  • as i understand my "alternatively" is not possible for this case. – susparsy Jan 13 '14 at 10:22