Sending Email in Android without using the default / built-in app

It is very easy to programmatically send email without using default email application in android. We can send email by using gmail, hotmail, yahoo or your domain email like

In comming example I will show you exact code to send email programmatically using android code. Before continue download following jar files and include these libarares into your android project.




How to add external jar file in eclipse

Now create a class

Note: You can change port accourding your requirement. Port could be 465 or 587

We must change mail host accouring to sender email.

For your own domain it could be

Now create other class

How to send email from your activity, button click or from background service etc.

You can use AsyncTask to send email.

Don’t forget to add internet permission in AndroidManifest.xml


  • Chetan R shanbag

    Share the XML file