Sending Mails using Intents
Using ACTION_SEND in intent for mail.. The code written below is using ACTION_SEND in the intent to generate mail which can be used to send the email to the single or multiple person. firstly we will generate the intent with ACTION_SEND or ACTION_SENDTO. ACTION_SENDTO has one drawback that we can not add the attachment/files to the intent that we are sending. after setting the ACTION we will set up the intent with the type of the data that it is holding, for now we will use "message/rfc822", documentation on the type you can get here ( rfc822 ). Now we will move on to the setting the parameters that we are going to pass to our email using the function putExtras(). after setting up parameters for the mail we will create a chooser and launch our intent. NOTE: The Android device on which application is going to run must have already setup their mailing application. CODE: Intent emailIntent=new Intent(Intent.ACTION_SEND); //add the multiple or single re...