Android Tutorial 64 - Sending Emails

Published: 25 March 2014
on channel: Code Here Now
16,969
45

This is an excerpt from Learn by Doing - Android for Beginners on Udemy.
https://www.udemy.com/learn-by-doing-...

Learn how to send an email using an intent.

Things to Remember
-----------------------------
1. Intent action to be used is Intent.ACTION_SEND.

2. Set the type by calling the Intent.setType(String) method to set the MIME type, which is message/rfc822.

3. For specifying the recipients' email addresses use a String[] containing an array of email IDs for the extra Intent.EXTRA_EMAIL.

4. Use the Intent.EXTRA_SUBJECT to mention the subject of your email.

5. The Intent.EXTRA_TEXT extra allows you to include the email body.

6. You can use the Intent.EXTRA_CC and Intent.EXTRA_BCC to specify the list of email addresses for recipients who you want to CC or BCC the email.

7. Wrap your Context.startActivity(Intent) call inside a try... catch block to avoid exceptions on devices that do not have an email client.


On this page of the site you can watch the video online Android Tutorial 64 - Sending Emails with a duration of hours minute second in good quality, which was uploaded by the user Code Here Now 25 March 2014, share the link with friends and acquaintances, this video has already been watched 16,969 times on youtube and it was liked by 45 viewers. Enjoy your viewing!