GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • JavaMail

This view

  • Original page
  • New address

GeezerVison is showing javaee.github.io — JavaMail

JavaMail for Android

JavaMail for Android is now available!

Android does not provide a Java Compatible runtime and so can’t run the standard JavaMail distribution. Instead, a special version of JavaMail is available for Android. This special version of JavaMail depends on a special version of the JavaBeans Activation Framework.

This version is available from the java.net maven repository. You can try out this version by adding the following to your build.gradle file for your Android application:

android {
    packagingOptions {
        pickFirst 'META-INF/LICENSE.txt' // picks the JavaMail license file
    }
}

repositories { 
    jcenter()
    maven {
        url "https://maven.java.net/content/groups/public/"
    }
}

dependencies {
    // use whatever the current version is...
    compile 'com.sun.mail:android-mail:1.6.2'
    compile 'com.sun.mail:android-activation:1.6.2'
}

One of the standard Java features not supported on Android is SASL. That means none of the “mail.protocol.sasl.*” properties will have any effect. One of the main uses of SASL was to enable OAuth2 support. The latest version of JavaMail includes built-in OAuth2 support that doesn’t require SASL. See the OAuth2 page for more details.

JavaMail for Android requires at least Android API level 19, which corresponds to Android KitKat, currently the oldest supported version of Android.

If you discover problems, please report them to [email protected].


Sources

APIs

FAQ

Download

Issue Tracker

Mailing List

Contribute

License


Sponsored by

© Oracle | By contributing to this project, you are agreeing to the terms of use described here.
This project is now part of the EE4J initiative; its activity is temporarily paused until it has been effectively transferred to the Eclipse Foundation.
See here for the EE4J transition status.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.