
Untitled
By: a guest on
Jun 17th, 2012 | syntax:
None | size: 0.72 KB | hits: 10 | expires: Never
setting the sender of an email using startActivity(mailIntent)
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("plain/text");
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{"recipient"+"@email.com"});
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Subject");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Text");
startActivity(Intent.createChooser(emailIntent, "Send mail..."));
emailIntent.putExtra(android.content.Intent.EXTRA_SENDERS_MAIL_ADDRESS, "My_email_address@email.com");
emailIntent.putExtra(android.content.Intent.EXTRA_USERS_EMAIL_ACCOUNT, "mail_account_x");