3

Currently I have a button that when pushed calls the Intent below.

Intent sharingIntent = new Intent(Intent.ACTION_SEND_MULTIPLE);
sharingIntent.putExtra(Intent.EXTRA_EMAIL,
new String[] { toString });
sharingIntent.putExtra(Intent.EXTRA_SUBJECT,
    "New Files from Safe Storage");
sharingIntent.setType("text/*");
startActivity(sharingIntent);

This intent then uses the default share activity to share the email with my attached file (which i took out for this example). When this code goes off it opens the gmail activity for me, but i still need to push the send button even though everything is filled in. Is there a way to make this instead just send automatically without showing the user the activity and having them forced to push "Send"?

1 Answers1

4

Have a look on the following link, there is an answer for your question.

Sending Email in Android using JavaMail API without using the default android app(Builtin Email application)

Community
  • 1
  • 1
Sunil Kumar Sahoo
  • 53,011
  • 55
  • 178
  • 243
  • Ah! Thank you very much, I implemented this into my application "Safe Storage" and it's working perfectly. Once I get attachments working I should be all set. Thanks again. – NightmareApps Dec 30 '11 at 08:31