Sending mail using Intent

I am developing email application. I am sending mail using Intent

final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{ address.getText().toString()});
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject.getText());
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, emailtext.getText());
EmailappActivity.this.startActivity(Intent.createChooser(emailIntent, "Send mail..."));

when I run the application it is sending mail by synchronizing with existing mail account(like gmail whaever we configured). But, I want to pass username and password of from address programatically. Can any one please help me?


You can't use intent if you want to set username & password programatically. Because android doesn't allow developer to be able to send email automatically using it's mail program. You can imagine what spam engine this vast amount of android device would become?

If you want to send email using user & password programatically, This related question can help you.

Need Your Help

how to crop an image from detected edges in matlab?


I have breast mri images and my purpose is to crop original images from edges that detected with fuzzy filtering method. in other words i want to have just breast not area around it.