Things You Need To Have Before Writing This Mail Code
1) Use Android Studio or Eclipse.
2) Download and add the Following JAR files into your project.
3) Also you need to enable less secure accounts on google from here Enable Account
NOTE: This account would be the account which is going to be used in your App to send email from.
After including these jar files in your project you need to open your gradle module App and add in the dependencies following
build.gradle (Module App)
Now, Open your AndroidManifest.xml file and add the following internet permissions after < /application> tag
Now, Open your activity_main.xml file and paste the following code.
Now Open your MainActivity.java file and add the following code
Now make a java class in your project and name it as GmailSender.java
Make another java class in your project and name it as JSSEProvider.java