Skip to content

Instantly share code, notes, and snippets.

@maruf00014
Created May 27, 2018 07:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maruf00014/ece4e1d2c8fe81b74838f3433524ab6b to your computer and use it in GitHub Desktop.
Save maruf00014/ece4e1d2c8fe81b74838f3433524ab6b to your computer and use it in GitHub Desktop.
private void sendMail() {
String recipientList = "admin@sikhismknowledge.com";
String[] recipients = recipientList.split(",");
String subject = mEditTextSubject.getText().toString();
String message = mEditTextMessage.getText().toString();
Intent sendIntent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(
"mailto","admin@sikhismknowledge.com", null));
sendIntent.putExtra(Intent.EXTRA_SUBJECT, subject);
sendIntent.putExtra(Intent.EXTRA_TEXT,
message);
startActivity(Intent.createChooser(sendIntent, "Send By"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment