Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I send an email from android application directly without showing the default email form of the device?

Tags:

I am building a form that sends emails from an android application, I am using Intents to send the email, that is:

Intent sendIntent; sendIntent = new Intent(Intent.ACTION_SEND); 

My requirement is that I want the email to be sent immediately, currently the application is showing me installed email applications in device where I can recompose the email before sending, I want to send the mail directly without showing installed applications.

Thanks

like image 926
Hassan Mokdad Avatar asked Jun 07 '11 11:06

Hassan Mokdad


People also ask

Which of the following is used to send mail in Android OS?

Intent Object - Action to send Email You will use ACTION_SEND action to launch an email client installed on your Android device. Following is simple syntax to create an intent with ACTION_SEND action.

How do I open email on Android?

Go to Settings > Add account > Other. Enter your full email address, such as [email protected] and then tap Manual Setup. Choose Personal (IMAP) or Personal (POP3). Enter your password and tap Next.


1 Answers

There are two ways

1) using SMTP follow the link for details

2) using Webservice( for example PHP script ) so there is a server side code and you hit that URL with param like ( name,subject etc) so basically PHP code send mail at the end and it's very easy to use .

Personally, I suggest you use Webservice

like image 96
Mayank Sharma Avatar answered Sep 20 '22 15:09

Mayank Sharma