Email is any message distributed by electronic means.
For sending email from our application, we dont have to built email client from scratch. We can
implement existing one like Gmail, outlook etc.
We use ACTION_SEND action to launch an existing email client using Intent. We just use an implicit
intent with right action and data.
Intent myEmailIntent = new Intent(Intent.ACTION_SEND);
myEmailIntent .setData(Uri.parse(mailid));
myEmailIntent.settype(text/plain);
Android has inbuilt support for TO,SUBJECT,CC,TEXT etc like
EXTRA_BCC : for blind carbon copied emails.
EXTRA_CC : for carbon copied emails.
EXTRA_EMAIL : email that should be delivered to.
EXTRA_SUBJECT : For Subject.
EXTRA_TEXT : data to be send.
myEmailIntent.putExtra(Intent.EXTRA_EMAIL, new String[]{Recipient});
myEmailIntent.putExtra(Intent.EXTRA_SUBJECT,SUBJECT);
myEmailIntent.putExtra(Intent.EXTRA_TEXT,Message);
0 Comment(s)