send email

This block is part of the mssgs mail group and was last modified in core v15.0.1.

send email v15.0.1

Sends one email through mssgs mail. The message is queued (status: queued) and delivered by the mail platform; read its outcome with get message.

In pins 13 + flow
  • flow
    flow
  • connection required
    mssgsmailconnection
  • subject required
    value

    The subject of the e-mail.

  • from
    value

    The sender, on the API key's own domain : anything else is refused with INVALID_FROM. A name can be set with Name <email@example.com>. Empty uses the service provider's default from address.

  • reply to
    value

    Reply-To address.

  • to required
    array

    1–50 recipients: addresses, Name <email> strings or {email, name} objects. For more, use the batch block.

  • cc
    array

    CC recipients.

  • bcc
    array

    BCC recipients.

  • html required
    value

    HTML body. With a template set on this block, this is the inner content the template wraps.

  • text version
    value

    Plain-text body. Empty strips the HTML version of its tags.

  • tag
    value

    Optional tag for grouping messages in the mssgs mail activity view.

  • metadata
    object

    Optional key/values stored with the message and returned by get message and the bounce webhook.

  • headers
    object

    Optional extra mail headers.

  • masked
    condition

    For content that must never be shown again : a login code, a reset link. mssgs mail overwrites the subject and bodies on its own record once the message is sent, so neither the activity view nor get message can read them back.

    Default false

Out pins 4 + flow
  • flow
    flow
  • connection
    mssgsmailconnection
  • success
    condition
  • error
    value

    The refusal as CODE: message, e.g. RECIPIENT_SUPPRESSED, DOMAIN_CEILING, INVALID_FROM, INVALID_API_KEY. Empty on success.

  • response
    object

    {message_guid, message_id, status} on success; the refusal body (with retry_after on a 429) otherwise.

POST email on the mssgs mail transactional API. success=true means the platform ACCEPTED and queued the message (response.message_guid, response.message_id, response.status=queued) : not that it was delivered; a later bounce arrives through the domain webhook and get_message. `from` must be on the API key's sender domain or the API answers INVALID_FROM; empty `from` falls back to the provider's default from address. `to` takes 1–50 recipients. `text` defaults to the html with tags stripped. error carries `CODE: message`; codes worth branching on: RECIPIENT_SUPPRESSED (a recipient bounced before), DOMAIN_CEILING and RATE_LIMITED (response.retry_after seconds), INVALID_API_KEY. masked=true makes the platform erase subject and bodies from its own record after sending : use it for login codes and reset links. Suppressed in a simulation: no mail leaves in a dry run.

mssgsmail
mssgs mail
email
mail
transactional

A typical wiring for send email: a function trigger starts the flow; open connection feeds the connection pin; value feeds the subject pin; with values feeds the array_to pin; value feeds the html pin; the flow out pin feeds debug.

Studio canvas example for the send email block: typical wiring for send email.

Version history

Introduced in v15.0.1.


Back to mssgs mail Return to the main group to view all sub-groups Back to mssgs mail Return to the group to view all blocks within this group