Send Email Intent

前端 未结 30 3328
忘掉有多难
忘掉有多难 2020-11-22 07:27
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType(\"text/html\");
intent.putExtra(Intent.EXTRA_EMAIL, \"emailaddress@emailaddress.com\");
intent.putExtr         


        
30条回答
  •  失恋的感觉
    2020-11-22 07:53

    This code is working in my device

    Intent mIntent = new Intent(Intent.ACTION_SENDTO);
    mIntent.setData(Uri.parse("mailto:"));
    mIntent.putExtra(Intent.EXTRA_EMAIL  , new String[] {"mahendrarajdhami@gmail.com"});
    mIntent.putExtra(Intent.EXTRA_SUBJECT, "");
    startActivity(Intent.createChooser(mIntent, "Send Email Using..."));
    

提交回复
热议问题