Android how to get sent / received email

Hi, I'm just curious. From messages Inbox / Outbox. we can get: phone number, message body, date, blocked status, StatusOnSim, etc. So we can receive from email (sent + mailbox): Email_id, Subject, Body, CC, BCC, etc. I want to extract all this from my email, e.g. Email_id, Subject, Body, CC, BCC, etc.

If anyone has an idea regarding this, please help me with this.

+6
source share
1 answer

Code for sending email:

Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_EMAIL, new String[] { "ur mail id" }); intent.putExtra(Intent.EXTRA_SUBJECT, "ur subject"); intent.putExtra(Intent.EXTRA_TEXT, "ur text"); intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(FileName)); startActivity(Intent.createChooser(intent, "Choose")); 

it cannot retrieve data such as Email_id, Subject, Body, CC, BCC, etc. from ur mailbox. But this is possible in the inbox.

+1
source

Source: https://habr.com/ru/post/924332/


All Articles