COMPOSE.EMAIL function

COMPOSE.EMAIL(Recipients?, SubjectLine?, Body?, CarbonCopy?, BlindCarbonCopy?) COMPOSE.EMAIL(Recipients?; SubjectLine?; Body?; CarbonCopy?; BlindCarbonCopy?)

Recipients

Text or { Text } (optional)

The primary recipients of the email. This parameter must consist of one or several email addresses, in the form of a text string or in the form of an array of text strings. A text string can contain multiple email addresses separated by spaces, commas or semicolons. Use & to join text strings together.

"user1@example.com;user2@example.com""user1@example.com;user2@example.com" offers to send the email to user1@example.com and to user2@example.com.

{ "user1@example.com", "user2@example.com" }{ "user1@example.com"; "user2@example.com" } has the same effect.

{ "office@example.com", EmailAddress}{ "office@example.com"; EmailAddress} offers to send the email to office@example.com and to the email address specified in the text field EmailAddress.

SubjectLine

Text (optional)

The subject line of the email.

Body

Text (optional)

The body of the email. Refer to the Body property of email report buttons for more examples of how to build an email body using a formula.

CarbonCopy

Text or { Text } (optional)

The carbon copy ("CC") recipients of the email. The Recipients parameter is similar and its examples apply to this parameter as well. If omitted, no carbon copy recipients are used.

BlindCarbonCopy

Text or { Text } (optional)

The blind carbon copy ("BCC") recipients of the email. The Recipients parameter is similar and its examples apply to this parameter as well. If omitted, no carbon copy recipients are used.

Returns

Nothing

This function does not return a value.

Brings up an email compose window. COMPOSE.EMAIL("test@example.com")COMPOSE.EMAIL("test@example.com") displays a compose window with the recipient email address test@example.com already filled out.

This function can only be used from an action formula. It is typically invoked from a formula associated with the OnPress property of a formula button.

The recipients are given as the first parameter. They must be provided as either a text string containing one or several email addresses, separated by spaces, commas or semicolons, or as an array of such text strings.

This function supports pre-filling the subject line, carbon copy ("CC") and blind carbon copy ("BCC") addresses and the email body. Refer to the Body property of email report buttons for more examples of how to build an email body using a formula.

Press Details above for more information on the supported parameters.

Depending on the device the app is run on, this function may start an email app, open a web browser with the user's preferred web-based email service, or do nothing if no such app or service is configured.

Use EMAILREPORT instead to send an email directly from the app.

Examples

COMPOSE.EMAIL()COMPOSE.EMAIL()

Brings up an email compose window with no pre-filled fields.

COMPOSE.EMAIL("test@example.com")COMPOSE.EMAIL("test@example.com")

Brings up an email compose window with the recipient email address test@example.com pre-filled.

COMPOSE.EMAIL("user1@example.com,user2@example.com")COMPOSE.EMAIL("user1@example.com,user2@example.com")

Brings up an email compose window with the recipient email addresses user1@example.com and user2@example.com pre-filled.

COMPOSE.EMAIL({ "user1@example.com", "user2@example.com" })COMPOSE.EMAIL({ "user1@example.com"; "user2@example.com" })

Brings up an email compose window with the recipient email addresses user1@example.com and user2@example.com pre-filled. The Recipients parameter can be either a single text string or an array of text strings.

COMPOSE.EMAIL(SubjectLine: "Sales inquiry", Body: "I'm interested in purchasing " & NumberOfCopies & " copies of " & ProductName & ".")COMPOSE.EMAIL(SubjectLine: "Sales inquiry"; Body: "I'm interested in purchasing " & NumberOfCopies & " copies of " & ProductName & ".")

Brings up an email compose window with the subject line and a body pre-filled. Use the NEWLINE function to insert line breaks. Refer to the Body property of email report buttons for more examples of how to build an email body using a formula.