Sending email
Send transactional email from your flows with Mailgun, Postmark, SendGrid, or Mandrill.
Meya has four transactional email integrations — Mailgun, Postmark, SendGrid, and Mandrill. They all share the same send-component base, so once you know one you know all four; the differences are the integration config and a few provider-specific fields.
Shared fields
Every email send component accepts the same core fields:
| Field | Description |
|---|---|
to | List of recipients (name + email). |
from | The sender. Some providers require a verified address. |
cc / bcc | Optional copy / blind-copy recipient lists. |
subject | The email subject. |
text | Plain-text body. Always include one — it's the fallback for clients that don't render HTML. |
html | HTML body. |
headers | Dict of custom headers (e.g. Reply-To). |
wait_for_response | If true (default), the flow waits for the send to confirm. If false, the email sends asynchronously and a failure only shows in your app logs — not to the user. |
Mailgun
type: meya.mailgun.integration
api_key: (@ vault.mailgun.api_key )
domain: (@ vault.mailgun.domain )- type: meya.mailgun.component.send
integration: integration.mailgun
to:
- name: (@ flow.name )
email: (@ flow.email )
from:
name: Meya Support
email: [email protected]
subject: (@ flow.subject )
text: (@ flow.text )
html: (@ flow.html )Custom headers work the same on every provider — here's a reply-to:
- type: meya.mailgun.component.send
integration: integration.mailgun
to:
- name: Erik Kalviainen
email: [email protected]
from:
name: Adam Neumann
email: [email protected]
subject: Testing reply-to
text: This is the text body.
headers:
Reply-To: [email protected]Postmark
type: meya.postmark.integration
server_token: (@ vault.postmark.server_token )Postmark adds the most provider-specific fields: tag, reply_to, track_opens, track_links, metadata, attachments, and message_stream.
- type: meya.postmark.component.send
integration: integration.postmark
to:
- name: (@ flow.name )
email: (@ flow.email )
from:
name: Meya Support
email: [email protected]
subject: (@ flow.subject )
text: (@ flow.text )
html: (@ flow.html )
tag: Invitation
reply_to: [email protected]
track_opens: true
track_links: HtmlOnly
message_stream: outboundSendGrid
type: meya.sendgrid.integration
api_key: (@ vault.sendgrid.api_key )
email_address: (@ vault.sendgrid.email_address )SendGrid's send component adds reply_to (a list of recipients) and attachments (a list of URLs — each file is downloaded and attached, max 10MB each).
- type: meya.sendgrid.component.send
integration: integration.sendgrid
to:
- name: (@ flow.name )
email: (@ flow.email )
from:
name: Meya Support
email: [email protected]
subject: (@ flow.subject )
text: (@ flow.text )
html: (@ flow.html )
SendGrid also needs SPF, DKIM, and MX DNS records set up, plus an inbound parse using default (not raw) payloads. See SendGrid's docs for the DNS steps.
Mandrill
type: meya.mandrill.integration
api_key: (@ vault.mandrill.api_key )- type: meya.mandrill.component.send
integration: integration.mandrill
to:
- name: (@ flow.name )
email: (@ flow.email )
from:
name: Meya Support
email: [email protected]
subject: (@ flow.subject )
text: (@ flow.text )
html: (@ flow.html )Reference
Updated 3 days ago
