MailTo

class MailTo(source)

MailTo URI parser. Replacement for android.net.MailTo.

This class parses a mailto scheme URI and then can be queried for the parsed parameters. This implements RFC 6068.

Note: scheme name matching is case-sensitive, unlike the formal RFC. As a result, you should always ensure that you write your URI with the scheme using lower case letters, and normalize any URIs you receive from outside of Android to ensure the scheme is lower case.

Properties

Link copied to clipboard
val MAILTO_SCHEME: String = "mailto:"

Functions

Link copied to clipboard
open fun getBcc(): String
Retrieve the BCC address line from the parsed mailto URI.
Link copied to clipboard
open fun getBody(): String
Retrieve the body line from the parsed mailto URI.
Link copied to clipboard
open fun getCc(): String
Retrieve the CC address line from the parsed mailto URI.
Link copied to clipboard
Retrieve all the parsed email headers from the mailto URI
Link copied to clipboard
Retrieve the subject line from the parsed mailto URI.
Link copied to clipboard
open fun getTo(): String
Retrieve the To address line from the parsed mailto URI.
Link copied to clipboard
open fun isMailTo(@Nullable uri: Uri): Boolean
Test to see if the given Uri is a mailto URI Note: scheme name matching is case-sensitive, unlike the formal RFC.
open fun isMailTo(@Nullable uri: String): Boolean
Test to see if the given string is a mailto URI Note: scheme name matching is case-sensitive, unlike the formal RFC.
Link copied to clipboard
open fun parse(@NonNull uri: Uri): MailTo
Parse and decode a mailto scheme Uri.
open fun parse(@NonNull uri: String): MailTo
Parse and decode a mailto scheme string.
Link copied to clipboard
open fun toString(): String