• Stars
    star
    173
  • Rank 220,124 (Top 5 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created almost 9 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An Android Library for the creation of SendTo Intents with mailto: URI

Email Intent Builder

Maven Central

An Android Library for the creation of SendTo Intents with mailto: URI

Read the article Android: Sending Email using Intents if you want to learn what motivated the creation of this library.

Include the library

Add this to your dependencies block in build.gradle:

implementation 'de.cketti.mailto:email-intent-builder:2.0.0'

Usage

Creating a simple email intent is as easy as this:

Intent emailIntent = EmailIntentBuilder.from(activity)
        .to("[email protected]")
        .subject("Feedback")
        .build();

This will build an intent with the action android.intent.action.SENDTO and the data mailto:[email protected]?subject=Feedback.

You can also use EmailIntentBuilder to add a couple of other fields and directly launch the intent:

EmailIntentBuilder.from(activity)
        .to("[email protected]")
        .cc("[email protected]")
        .bcc("[email protected]")
        .subject("Message from an app")
        .body("Some text here")
        .start();

Changelog

Version 2.0.0 (2019-11-26)

  • Use org.jetbrains:annotations for nullability annotations
  • No functional changes

Version 1.0.0 (2015-12-19)

  • Initial release

License

Copyright 2015-2019 cketti

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

More Repositories

1

ckChangeLog

ckChangeLog - An Android Library to display a Change Log
Java
181
star
2

kotlin-codepoints

Kotlin Multiplatform (KMP) library that adds basic support for Unicode code points
Kotlin
112
star
3

ShareIntentBuilder

Share Intent Builder - Android Library for the type-safe creation of Share Intents.
Java
45
star
4

SafeContentResolver

A replacement for Android's ContentResolver that protects against the Surreptitious Sharing attack
Java
40
star
5

jitsi-hacks

Jitsi Hacks – Extending Jitsi Meet using injected scripts
JavaScript
33
star
6

AdbScreenAwake

Android app to keep the screen awake while ADB is connected to the device
Kotlin
22
star
7

PublicFileProvider

Android library to publicly expose files via content:// URI. Consider using FileProvider instead!
Java
14
star
8

OkHttpWithContentUri

Use Android's content:// URIs when uploading or downloading content with OkHttp
Kotlin
13
star
9

FamilyEmoji

👨🏿‍👩🏾‍👧🏽‍👦🏻 Recreate your family as emoji ZWJ sequence
JavaScript
11
star
10

ShareUrlToClipboard

Android sample app that shows how to add a 'Copy link to clipboard' option to the Share dialog
Java
9
star
11

DashClock_K-9

[ABANDONED] K-9 Mail DashClock Extension
Java
6
star
12

SmartK9

K-9 Mail for SmartWatch - Displays notifications for new messages on your Sony SmartWatch 2
Java
5
star
13

MailToCompat

A drop-in replacement for Android's (buggy) MailTo class
Java
4
star
14

HoloColorPicker_demo

Small application that demonstrates the capabilities of the HoloColorPicker library
Java
2
star
15

Aapt2XmlOddity

Code to reproduce https://issuetracker.google.com/issues/71805084
Java
2
star
16

AttachContact

Attach Contact (Android app)
Kotlin
2
star
17

jmap-library

A Java library for the JSON Meta Application Protocol
Java
1
star
18

ContextMenuBug

Java
1
star
19

cketti

👋
1
star
20

MateLightAndroid

Android app to control the Mate Light installation @ c-base
Java
1
star