Skip to main content

composeEmail

Requires permission sales:quote:update.

Composes and sends a new email about a quote to every To and Cc address given. For now a new email must be tied to a quote: without one the call comes back unsuccessful with a message instead of sending. The result carries success, a message and the email's IDs. Requires permission to update quotes.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation ComposeEmail($input: ComposeEmailInput!) {
composeEmail(input: $input) {
emailActivityId
error
message
messageId
replyToAddress
success
}
}

Variables:

{
"input": {
"bodyHtml": "string",
"subject": "string",
"toEmails": [
"string"
]
}
}

Response:

{
"data": {
"composeEmail": {
"emailActivityId": "string",
"error": "string",
"message": "string",
"messageId": "string",
"replyToAddress": "string",
"success": true
}
}
}
composeEmail(
input: ComposeEmailInput!
): SendEmailResult!

Arguments​

composeEmail.input ● ComposeEmailInput! non-null input​

The To and Cc addresses, subject, body, and the quote reference type and ID.

Type​

SendEmailResult object​

The result of sending an email.