send Mail via Intent - Android android.content

Android examples for android.content:Intent

Description

send Mail via Intent

Demo Code

import android.content.Context;
import android.content.Intent;
import android.net.Uri;

public class Main {

  public static void sendMail(Context mContext, String mailID) {
    Uri uri = Uri.parse("mailto:" + mailID);
    mContext.startActivity(new Intent(Intent.ACTION_SENDTO, uri));
  }/*from   w w  w .  j av  a  2  s . c o  m*/

}

Related Tutorials