NightmareApps
NightmareApps

Reputation: 43

Sending email through intent without having to press send button

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"?

Upvotes: 3

Views: 1035

Answers (1)

Sunil Kumar Sahoo
Sunil Kumar Sahoo

Reputation: 53687

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)

Upvotes: 3

Related Questions