Skip to content

Instantly share code, notes, and snippets.

@codenameone
Created March 4, 2016 14:35
Show Gist options
  • Save codenameone/3db47a2ff8b35cae6410 to your computer and use it in GitHub Desktop.
Save codenameone/3db47a2ff8b35cae6410 to your computer and use it in GitHub Desktop.
Demonstrates sending a message with attachments via the messaging API in Codename One using the OS native email client with
Message m = new Message("Body of message");
m.getAttachments().put(textAttachmentUri, "text/plain");
m.getAttachments().put(imageAttachmentUri, "image/png");
Display.getInstance().sendMessage(new String[] {"[email protected]"}, "Subject of message", m);
@codenameone
Copy link
Author

Sample usage of Message API.

From the Codename One project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment