Added in API level 1

MailTo

open class MailTo
kotlin.Any
   ↳ android.net.MailTo

MailTo URL parser This class parses a mailto scheme URL and then can be queried for the parsed parameters. This implements RFC 2368.

Summary

Constants
static String

Public methods
open String!

Retrieve the body line from the parsed mailto URL.

open String!

Retrieve the CC address line from the parsed mailto URL.

open MutableMap<String!, String!>!

Retrieve all the parsed email headers from the mailto URL

open String!

Retrieve the subject line from the parsed mailto URL.

open String!

Retrieve the To address line from the parsed mailto URL.

open static Boolean

Test to see if the given string is a mailto URL

open static MailTo!
parse(url: String!)

Parse and decode a mailto scheme string.

open String

Constants

MAILTO_SCHEME

Added in API level 1
static val MAILTO_SCHEME: String
Value: "mailto:"

Public methods

getBody

Added in API level 1
open fun getBody(): String!

Retrieve the body line from the parsed mailto URL. If no body line was specified, then null is return

Return
String! body or null

getCc

Added in API level 1
open fun getCc(): String!

Retrieve the CC address line from the parsed mailto URL. This could be several email address that are comma-space delimited. If no CC line was specified, then null is return

Return
String! comma delimited email addresses or null

getHeaders

Added in API level 1
open fun getHeaders(): MutableMap<String!, String!>!

Retrieve all the parsed email headers from the mailto URL

Return
MutableMap<String!, String!>! map containing all parsed values

getSubject

Added in API level 1
open fun getSubject(): String!

Retrieve the subject line from the parsed mailto URL. If no subject line was specified, then null is return

Return
String! subject or null

getTo

Added in API level 1
open fun getTo(): String!

Retrieve the To address line from the parsed mailto URL. This could be several email address that are comma-space delimited. If no To line was specified, then null is return

Return
String! comma delimited email addresses or null

isMailTo

Added in API level 1
open static fun isMailTo(url: String!): Boolean

Test to see if the given string is a mailto URL

Parameters
url String!: string to be tested
Return
Boolean true if the string is a mailto URL

parse

Added in API level 1
open static fun parse(url: String!): MailTo!

Parse and decode a mailto scheme string. This parser implements RFC 2368. The returned object can be queried for the parsed parameters.

Parameters
url String!: String containing a mailto URL
Return
MailTo! MailTo object
Exceptions
android.net.ParseException if the scheme is not a mailto URL

toString

Added in API level 1
open fun toString(): String
Return
String a string representation of the object.