tags:

views:

108

answers:

1

Hello,

I am using this code to send a mail.

final Intent mail_Intent=new Intent(Intent.ACTION_SEND);
mail_Intent.setType("plain/text");
mail_Intent.putExtra(Intent.EXTRA_EMAIL,new String[]{toText.getText().toString()});             mail_Intent.putExtra(Intent.EXTRA_SUBJECT,subjectText.getText().toString());                mail_Intent.putExtra(Intent.EXTRA_TEXT,bodyText.getText().toString());              
Intent i=Intent.createChooser(mail_Intent, "Send Mail");
startActivity(i);

But on the following screen i get the default android API.I do not want that screen to popup. Is there any other way where i can silently send the mail.

Any help is appreciated. Thanks in advance..

A: 

If you have access to a server, with a mail server set up on it AND php. Here is a way :
Design whatever layout you like to make the user enter his name, his mail, the recipient, the subject and the mail body (and any other information you might want him to give). Then you grab all this, and put it in a http request adding these parameters in POST and send then to a php page that will deal with sending the email. However, this is a low security method and not really safe in my point of view... So be on your guard...

Sephy