In this article, you will create a simple application that can be used to send email through your Android application. We can send data using intent with ACTION_SEND with extra fields.
There are three types of email, subject, body, etc. Let's take one example of sending mail like taking input of email address, subject, and body for a Mobile Application.
Step 1: Create a new project in Android or you can use an already created project.
Step 2: Create an activity_main.xml file in your layout folder . path (res>layout)
implement the same invoke the following code inside activity_main.xml file.
Step 3: Create an MainActivity.java file in your package folder .
Implement the same invoke the following code inside MainActivity.java file.
Step 4: Output of above example
Happy coding!