Introduction
In this article you will learn how to develop email applications for sending information from one mail to another in Android applications using Android Studio.
Requirements
If you want to develop the email application it should follow the below steps.
Step 1
Now, open Android studio and go to File and New and choose NewProject .

Step 2
Her, you will write the application name and click the next button.

Now, we can choose the application version, it is Target version and devices.

Step 3
Now choose to Activity (Blank Activity, Empty Activity) and click the Next button.

Here, you will write the Activity name and click the Finish button.

Step 4
Here, NewProject is open and you will go to design page (activity_main.xml) and you will build the design, it should follow the drag and drop method, it is the option (editText,Button).

Here,you will see the design page(Graphical user Interface).

Now,you will see the activity_main.xml code
- <?xml version="1.0" encoding="utf-8"?>
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context="xyz.rvconstructions.www.sendemailapp.MainActivity">
- <EditText android:layout_width="wrap_content" android:layout_height="wrap_content" android:inputType="textEmailAddress" android:ems="10" android:id="@+id/editText" android:layout_alignParentTop="true" android:layout_alignParentRight="true" android:layout_alignParentEnd="true" />
- <EditText android:layout_width="wrap_content" android:layout_height="wrap_content" android:inputType="textEmailAddress" android:ems="10" android:id="@+id/editText2" android:layout_below="@+id/editText" android:layout_alignRight="@+id/editText" android:layout_alignEnd="@+id/editText" />
- <EditText android:layout_width="wrap_content" android:layout_height="wrap_content" android:inputType="textEmailAddress" android:ems="10" android:id="@+id/editText3" android:layout_below="@+id/editText2" android:layout_alignRight="@+id/editText2" android:layout_alignEnd="@+id/editText2" />
- <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="SEND MAIL" android:id="@+id/sendbttn" android:layout_centerVertical="true" android:layout_alignLeft="@+id/editText3" android:layout_alignStart="@+id/editText3" />
- <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Recipient" android:id="@+id/textView" android:layout_alignBottom="@+id/editText" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" />
- <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="subject" android:id="@+id/textView2" android:layout_alignBottom="@+id/editText2" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" />
- <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Message Body" android:id="@+id/textView3" android:layout_alignBottom="@+id/editText3" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" /> </RelativeLayout>












Join the conversation! Your thoughts help the community grow.