Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Sending Email in android

    • 0
    • 2
    • 2
    • 0
    • 0
    • 0
    • 0
    • 0
    • 249
    Comment on it

    Email is any message distributed by electronic means. For sending email from our application, we dont have to built email client from scratch. We can implement existing one like Gmail, outlook etc.

    We use ACTION_SEND action to launch an existing email client using Intent. We just use an implicit intent with right action and data.

    Intent myEmailIntent = new Intent(Intent.ACTION_SEND);
    myEmailIntent .setData(Uri.parse(mailid));
    myEmailIntent.settype(text/plain);
    

    Android has inbuilt support for TO,SUBJECT,CC,TEXT etc like
    EXTRA_BCC : for blind carbon copied emails.
    EXTRA_CC : for carbon copied emails.
    EXTRA_EMAIL : email that should be delivered to.
    EXTRA_SUBJECT : For Subject.
    EXTRA_TEXT : data to be send.

    myEmailIntent.putExtra(Intent.EXTRA_EMAIL, new String[]{Recipient});
    myEmailIntent.putExtra(Intent.EXTRA_SUBJECT,SUBJECT);
    myEmailIntent.putExtra(Intent.EXTRA_TEXT,Message);

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: