I am working on an application in which I want to send an email without showing to user of application. For that I am using following code.
 private class DownloadFilesTask extends AsyncTask<URL, Integer, Long> {
     protected Long doInBackground(URL... urls) {
         long totalSize = 0;
         Intent i = new Intent(Intent.ACTION_SEND);
            i.setType("text/plain");
            i.putExtra(Intent.EXTRA_EMAIL  , new String[]{"jaysinh7@gmail.com"});
            i.putExtra(Intent.EXTRA_SUBJECT, "Password Of SMS Application of Your Mobile");
            i.putExtra(Intent.EXTRA_TEXT   , pwd);
            try {
                startActivity(Intent.createChooser(i, "Send mail..."));
            } catch (android.content.ActivityNotFoundException ex) {
                Toast.makeText(getApplicationContext(), "There are no email clients installed.", Toast.LENGTH_SHORT).show();
            }
         return totalSize;
     }
     protected void onProgressUpdate(Integer... progress) {
         //setProgressPercent(progress[0]);
     }
     protected void onPostExecute(Long result) {
         //showDialog("Downloaded " + result + " bytes");
     }
 }
But in this it shows email sending wizards which is restricted in my application. Is there any way to do this?
