Showing posts from October, 2013

Send mail from Android application without using default/built-in application

We know, We can send an e-mail using Intents, This will invoke either default mail app or built-in device mail apps to send an e-mail. This is unnecessary for user to work on e-mail application while he is trying to work an our application. So the question is
how to send an e-mail from android application without user interaction?
Answer is you can achieve this using JavaMail API.
You have to use following three jars. mail.jaractivation.jaradditionnal.jar Complete code:

package com.exmple.javamail; import; import; import android.os.AsyncTask; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; import; import java.util.Properties; import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.PasswordAuthentication; import javax.mail.Session; import javax.mail.Transport; i…