Last active
August 31, 2019 16:44
-
-
Save trulymittal/ebdbd32d735002b91efb01364bacd053 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void sendmail() { | |
String[] TO_EMAILS = {"[email protected]", "[email protected]"}; | |
String[] CC = {"[email protected]"}; | |
String[] BCC = {"[email protected]"}; | |
Intent intent = new Intent(Intent.ACTION_SENDTO); | |
intent.setData(Uri.parse("mailto:")); | |
intent.putExtra(Intent.EXTRA_EMAIL, TO_EMAILS); | |
intent.putExtra(Intent.EXTRA_CC, CC); | |
intent.putExtra(Intent.EXTRA_BCC, BCC); | |
intent.putExtra(Intent.EXTRA_SUBJECT, "Subject of the email."); | |
intent.putExtra(Intent.EXTRA_TEXT, "Body of the email"); | |
startActivity(Intent.createChooser(intent, "Choose your email client")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment