button2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String emailList[]= {"rufidennis@gmail.com"};
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("message/rfc822");
intent.putExtra(Intent.EXTRA_EMAIL,emailList);
intent.putExtra(Intent.EXTRA_SUBJECT,"Email Subject");
intent.putExtra(Intent.EXTRA_TEXT,"file:///android_asset/www/sample3.html");
startActivity(Intent.createChooser(intent,"Choice email APP"));
}
});
I am using buttons onclick listener method to send an email via my app. I have an html file which i want to send as an email content, the location of file is stored in www folder inside assets. How can i send that email as an email content??