Configuring Medplum email with SES, SendGrid or project SMTP

Set up the email that carries Medplum invites, password resets and MFA codes, choosing between server email and per-project SMTP relays on your own domain.

On this page

Configuring Medplum email with SES, SendGrid or project SMTP: what it does and when you need it

Project SMTP lets each Medplum project send its own email through a relay you configure, so invites, password resets, email verification and MFA codes can leave from your organization's domain instead of a single server-level sender. Medplum's project SMTP covers two kinds of mail: messages sent through the sendEmail API and system emails such as invites, password resets, email verification and MFA codes. A self-hosted go-live is where this matters most, because a user who never receives an invite or a one-time code cannot complete sign-in, and the failure usually surfaces on day one with a clinical team waiting.

The relay can be SendGrid, Mailgun or Amazon SES SMTP, and the credentials are stored as project secrets rather than in server configuration. Confirm the current secret names and the required SMTP settings in the project SMTP documentation before you build the configuration, and confirm which sender address and domain verification your relay requires. Decide early whether one shared sender is acceptable for every project, or whether each project needs its own sending identity, reply address and relay account.

A single server-level sender is usually enough for one organization with one project and no external users. Per-project relays become necessary when you run multiple projects for different clients, tenants or business units that must not share a sending domain, when a customer's security team asks where its users' email originates, or when deliverability and suppression lists must be managed separately for each group. Ask your relay provider what its per-account sending limits, bounce handling and suppression behavior are, because those controls, not Medplum, determine whether a one-time code arrives in time. Plan an owner for the relay account, the domain's SPF, DKIM and DMARC records, and a test that sends each system email type from every project before users are onboarded.

Email delivery options and when each fits

This table compares server-level email provider setup with per-project SMTP relays stored as project secrets. Read each column against your deployment model and tenancy: the right choice depends on whether one operator owns all mail or each Medplum project sends from its own domain.

OptionScopeWho manages credentialsSender domainMulti-tenant fitWhat to confirm with the vendor
Server-level provider (for example Amazon SES on an AWS install)Server-wide mail for the whole Medplum deploymentPlatform operator, through server configuration and cloud secretsOne sender domain configured for the serverLimited: all projects share one sender identityDomain verification steps, sending quota and sandbox status for the account
Project SMTP with SendGridPer project: sendEmail messages plus system emails such as invites and MFA codesProject administrator, stored as project secretsDomain the project verifies with the providerStrong: each project can use its own relay and senderDomain authentication setup, API key scope and plan limits
Project SMTP with MailgunPer project, same message types as other project SMTP relaysProject administrator, stored as project secretsDomain verified in the Mailgun account for that projectStrong: suited to separate senders per tenantRegion of the sending endpoint, domain verification and suppression list handling
Project SMTP with Amazon SES SMTPPer project, using SES SMTP credentials as project secretsProject administrator, with SMTP credentials created in SESIdentity verified in the SES account used by the projectGood where each tenant has its own SES identityWhether the account is out of the SES sandbox, SMTP credential rotation and identity limits
Delivery to end users (invites, resets, MFA codes)Transactional mail for people who sign in to a projectDepends on which option sends the mailMust match the sender domain your users trustConfirm which sender each project uses before go-liveTest delivery to your mail domains, including spam filtering and DMARC alignment

Choosing a sender for a single organization or a multi-tenant product

When one organization runs its own Medplum deployment for its own staff and patients, one sender is usually enough. The server-level email provider can send invites, password resets and MFA codes under a single brand, and the organization's own platform team holds the relationship with the email provider. Ownership is simple: one domain, one set of DNS records, one account to monitor. The trade-off is that every system email comes from the same address, so the sender name has to be generic enough to suit every audience that receives it.

  • Ownership: The platform or IT team owns the email provider account, the sending identity and the credentials stored as configuration secrets.
  • DNS records: The client's DNS team publishes SPF, DKIM and DMARC records for the one sending domain and keeps them current when the provider changes.
  • Sender identity: Invites, resets and codes share one From address, so the display name should be recognizable to staff and patients alike.
  • Support path: A failed relay is one incident with one owner, and the on-call runbook can name a single provider console to check.
  • Change control: Rotating SMTP or API credentials is a single change tracked in the same process as other server configuration.

Before go-live, confirm with your DNS team who can edit the sending domain's records and who receives DMARC aggregate reports.

How an invite or MFA code travels from Medplum to the user's inbox

The message starts in the Medplum server when it triggers a system email such as an invite, password reset, email verification or MFA code. The server then uses the project SMTP secrets when a project has its own relay, or the server-level email provider when it does not. The relay sends the message using your sender domain, so SPF, DKIM and DMARC records you control decide whether the user's mail server accepts it. Check the credentials boundary and those DNS records first when messages go missing.

Invite and MFA email path, showing the credential boundary and the DNS records that authenticate sender domain.

Setting up project SMTP from your own domain

This sequence takes a self-hosted Medplum project from no outbound email to a verified sender on your own domain, delivering invites, password resets and MFA codes that reach users' inboxes. Each step ends with a check so the next one starts from a known state.

  1. Confirm the sending domain and DNS access

    Your security or platform lead decides which domain or subdomain Medplum mail will come from, such as a dedicated subdomain for clinical notifications, and confirms who can edit its DNS records. Ask the DNS owner for write access before any relay work starts, because the relay will require several records. Done means you have a written sender domain, a named DNS owner, and a confirmed way to publish records within your change process.

  2. Create the sender identity and SMTP credentials

    In your relay account (SendGrid, Mailgun or Amazon SES SMTP), create a sender identity for an address on the verified domain, such as a no-reply address, and generate SMTP credentials scoped to sending. Record the host, port, encryption mode and username, and keep the password in your password manager or vault rather than in a ticket. Confirm the relay account is on a plan that permits transactional sending to your recipient population. Done means you hold a complete set of SMTP settings for one sender address.

  3. Verify the domain with the relay

    Publish the DNS records the relay gives you for domain authentication, which typically cover SPF, DKIM and a return-path or tracking domain, and then trigger verification in the relay console. Your DNS owner makes the changes and your team checks propagation with a DNS lookup tool. Confirm the relay reports the domain and sender as verified before moving on. Done means the relay shows the domain as verified and the records resolve from outside your network.

  4. Store SMTP settings as project secrets

    In the Medplum project, add the SMTP host, port, username, password and sender address as project secrets, following the naming in the project SMTP documentation. Limit who can read or edit these secrets to the people who manage the project, and record the change in your configuration change log. Do not paste credentials into project config files or chat. Done means the secrets are saved in the project and a project administrator can see them listed without exposing the values.

  5. Send a test invite and password reset

    Using a test user account you control, invite a new user to the project and then trigger a password reset for the same account. Note the time sent, the sender shown and the link host in each message. Check that links point to your configured application base URL and not a default or internal hostname. Done means both messages arrive at the test mailbox, the sender matches the verified identity, and the links resolve to your production sign-in address.

  6. Confirm MFA code delivery

    Enable multi-factor authentication for the test account, then trigger an email-based MFA code sign-in. Confirm the code arrives, the message names the correct project and sender, and the code works within the expected window. Repeat with a second recipient on a different mail provider to catch provider-specific filtering. Done means codes arrive for both test recipients and can be used to complete sign-in.

  7. Check inbox placement and spam scoring

    Send the same test messages to mailboxes at several providers that your users actually use, and inspect the headers for SPF, DKIM and DMARC results. Ask the relay's reporting dashboard or your mail administrator whether messages are being deferred, bounced or flagged. Ask your security team to confirm a DMARC policy is in place before you rely on the sender for clinical workflows. Done means messages land in the inbox at every test provider, authentication results pass, and you have a written note of any provider that still routes them to spam.

Protecting SMTP credentials and sender identity

Project SMTP gives a Medplum project a direct path to send invites, password resets and MFA codes from your domain. The relay credentials and sender settings control who can send email as your organization, so they need the same care as other production secrets. The cards below cover the controls to set before the first invite goes out.

Store relay credentials as project secrets

Medplum project SMTP reads the relay host, port and login from project secrets, so the SMTP password should never appear in a config file, a repository or a shared document. Keep the relay credential in the project secrets that Medplum manages and limit who can read or edit them. Confirm with your Medplum admin which accounts can view project secrets, since anyone who can edit them can redirect system email to a relay they control.

Project SMTP docs

Rotate relay credentials on a schedule

A relay credential used for system email is a long-lived secret that every invite and reset depends on. Set a rotation schedule with your security team and rehearse it: create a new SMTP credential at the provider, update the project secrets, send a test invite, then revoke the old credential. Ask your relay provider whether it supports multiple active keys so rotation does not interrupt sign-in emails.

Restrict who can change the sender

The sender address and the SMTP login decide whose name appears on invites and MFA codes. Limit changes to these settings to a small group of named administrators and record each change in your change control process. A sender changed without review can make legitimate-looking phishing emails appear to come from your organization, so review sender changes the same way you review a configuration release.

Verify the sending domain before launch

Spoofing risk rises when a sending domain is not authenticated. Work with your email team to publish SPF, DKIM and a DMARC policy for the sending domain, and confirm with your relay provider which records it requires. Test that messages from the relay pass these checks before patients or clinicians receive invites. The exact record values come from your provider, so copy them from its console rather than from a template.

Set retention for email metadata

Invites, resets and MFA emails create metadata such as recipient addresses, timestamps and delivery status, and some of it may be health-adjacent when a project serves a specific clinic or program. Decide how long your relay provider keeps message logs, whether you can shorten that period, and who may query them. Ask the provider to confirm its default retention and deletion process in writing, and align the answer with your records policy.

Plan for a compromised relay

If the relay is compromised, an attacker may read or alter password reset links and MFA codes, which can enable account takeover. Define a response plan: revoke the relay credential, switch to a backup relay, invalidate outstanding reset links, force password resets for affected accounts and review recent sign-in activity. Confirm with your Medplum administrators how quickly active sessions and pending codes can be cleared in your deployment.

What you can customize in invite and MFA emails

The sender identity and the content of system emails are the two parts of invite and MFA delivery you control, and they sit in different places. The sender address and SMTP credentials belong to the project's SMTP secrets, so the sending domain and mailbox are your decision as soon as you point a project at your own relay. Invites, password resets, email verification and MFA codes all go out through that relay once project SMTP is configured, which means one change to the project secret changes the sender for every system email in that project. Before you go live, confirm with your relay provider that the domain is verified for the sender address you plan to use and that SPF, DKIM and DMARC records are in place for that domain, since those records decide whether a mailbox provider accepts the message at all.

Changing the wording, layout or logo inside system emails is a separate question, and the answer depends on your Medplum version. Confirm with the Medplum project SMTP documentation which templates can be edited through project configuration and which are fixed in the server or the web app. Treat anything that is not on that list as a code or build change: you would fork the relevant template, maintain the fork through every upgrade, and retest the message on each minor version. Ask your Medplum contact or check the release notes for your target version before you promise stakeholders a branded invite.

Per-project app names inside MFA emails, per-client sign-in forms and the broader branding of the app are covered in the branding topic, so this section stops at the sender and the template boundary. Plan the decision early because it drives the work: a single-brand deployment can often keep standard templates and change only the sender, while a multi-tenant product that needs each client to see its own name will need a template strategy agreed with the branding work. Record which templates you will leave untouched, which you will change through configuration, and which would need a build change, so your security and compliance reviewers see the same list you test against.

Limits to confirm before go-live

Email from self-hosted Medplum depends on limits that sit outside the Medplum server: your relay's quotas, your plan terms, and how Medplum's own email templates behave in the version you run. The cards below list what to confirm with each vendor and in your own test environment before invites and MFA codes reach real users.

Relay sending quotas and plan limits

Your SES, SendGrid or Mailgun account sets daily and per-second sending caps, and those caps may differ by account tier, sending domain or region. Ask the vendor for the exact limits on your plan, how they are enforced, and whether a quota increase needs a review. Compare them with the peak volume your invites, resets and MFA codes could produce during a rollout or an incident response, not just the average.

Shared or separate relay for sendEmail

Project SMTP covers both sendEmail API messages from your bots and applications and system emails such as invites and MFA codes. Confirm whether both draw from the same relay credentials and quota. If a bot sending bulk notifications can exhaust the limit, a user waiting for an MFA code may never receive it, so consider a separate relay or sender identity for application mail.

Project SMTP docs

Failover between providers

Medplum project SMTP is configured with one relay in its project secrets, so a provider outage stops system email unless you plan for it. Decide whether you need a second provider, how you would switch the project secrets, who has permission to do it, and how you would confirm that invites and MFA codes are flowing again after the switch. Test the switch before you need it.

Bounce and complaint handling

Bounces and spam complaints reduce sender reputation and can suspend sending from a domain. Confirm which bounce and complaint notifications your provider sends, where they go, and who acts on them. Check how a suspended or rejected address affects a clinician's invite or a patient's verification email, and whether anyone is alerted before a suspension takes effect.

Email template behavior in your version

System emails such as invites, password resets, email verification and MFA codes are generated by the Medplum server. Their wording, links and sender name can change between releases, so check the templates in the exact version you run, against your upgrade plan, before go-live. Confirm that the links in each email point to your appBaseUrl and that the sender matches your approved domain.

Upgrade guide

Questions teams ask before configuring Medplum email

What does configuring Medplum email cost, and what drives it up?

The cost is mostly the time of the people who set it up, plus any fees your email relay charges. Your relay provider bills for sending, and that cost recurs with volume. The main drivers are the number of Medplum projects that need their own sender, the number of sending domains, how much DNS access your team has, and how much testing you do across invites, password resets and MFA codes. Each extra project or domain adds verification and testing work. Before you ask a partner for a quote, confirm the number of projects and domains, who owns DNS, and which relay account will be used, since those inputs set the scope.

How long does it take to verify a sending domain for Medplum?

Verification time depends mostly on how quickly DNS changes are made and propagated, and on how fast your relay provider completes its own checks. Delays usually come from waiting on a DNS owner to add records, records entered with typos, or a domain that is already used for other mail and needs careful coordination. Medplum's project SMTP documentation covers the relay providers it supports, including SendGrid, Mailgun and Amazon SES SMTP. Ask your relay provider for its current verification steps and expected turnaround, and plan the DNS change request before the Medplum configuration starts.

What must our team provide before email setup can start?

You need three things in place: a DNS owner who can publish the sender records for your domain, a relay account with SMTP credentials, and access to the Medplum project where secrets are stored. Depending on the relay, you may also need access to the cloud account if you use Amazon SES, so that identities and sending permissions can be set up there. Confirm who approves changes to each of these, because approvals often take longer than the technical work. The Medplum project SMTP page explains how SMTP settings are stored as project secrets.

Can one internal engineer configure Medplum email without a partner?

Yes, in many organizations one engineer can do the work, provided that person can reach the DNS owner, the relay account and the Medplum project admin tools. The task is configuration rather than deep development, but it touches several teams at once. The skills needed are a working understanding of SMTP, DNS records and how your relay authenticates senders, plus the ability to test every message type that Medplum sends. The risk is a single point of knowledge. If that engineer leaves or is busy with a Medplum upgrade, email changes can stall. Document the sender settings, the DNS records and the test results so another person can review or repeat them.

What breaks if email fails during a user invite?

A user who is invited to a Medplum project does not receive the invite, so they cannot complete account setup, and the administrator may assume the account is active when it is not. The same failure affects password resets, email verification and MFA codes. A user who relies on an MFA email code may be locked out of sign-in until the email path works or an administrator takes another step. Because project SMTP covers these system emails, a relay problem affects onboarding and account recovery, not only messages sent through the sendEmail API. Test every message type after each configuration change, and keep an admin path for recovery.

Which email messages does project SMTP cover in Medplum?

Project SMTP covers messages sent through the sendEmail API and the system emails Medplum generates for a project. Those system emails include invites, password resets, email verification and MFA codes. This matters because teams often test only one path, usually a manual send, and assume the others work. Build a short test list that includes an invite to a new user, a password reset, an email verification and an MFA code, and check each one arrives from the expected sender address. Confirm the exact behavior for your Medplum version in the project SMTP documentation.

Does the sender need to match our own domain for Medplum emails?

Your messages will be easier to trust and easier to manage if they come from your own domain, which is the reason per-project SMTP relays are configured with that domain. Using your domain means your DNS owner must publish the records your relay asks for, and it means reputation and bounce handling are tied to your organization. Some teams choose a separate subdomain for patient-facing or clinic-facing messages. Confirm the sender address, reply-to address and the subdomain strategy with your security and communications teams before configuration, since changing them later affects every project that uses the sender.

Does custom email content and branding change the setup work?

Custom email content and sender branding add review and testing work, but they do not change the core relay configuration. Changing the wording of invites, resets or MFA emails, or changing the sender name shown to users, requires agreement on the text, legal or privacy review where needed, and tests in each affected project. If you run several clients or projects, each one may need its own sender name or content, which multiplies that effort. Ask for the list of emails to be customized and the number of projects affected before estimating the work.

Where outside help changes the outcome for email delivery

Outside help adds the most value in the DNS and deliverability review, because invites, password resets and MFA codes fail quietly when sender records are wrong. A partner can check the sending domain's SPF, DKIM and DMARC records against the relay you chose (SendGrid, Mailgun or Amazon SES SMTP), confirm that the From address matches a domain you control, and review bounce and complaint handling before go-live. The outcome depends on your DNS provider, your relay account and your mail routing, so confirm each with the people who own them rather than assuming the defaults hold.

A second area is separating the server sender from the project senders. The server-level email settings cover the platform's own messages, while each Medplum project can carry its own SMTP secrets, so a multi-tenant product may need different sender identities per client. A partner can map which messages use which sender, test invites, password resets, email verification and MFA codes in each tenant, and confirm that one tenant's configuration does not leak into another's. Ask for that test matrix in writing, with the tenants and message types it covers.

The third area is documentation for your security review. Reviewers will ask where credentials are stored, who can change sender settings and how the flows were tested, and a partner can assemble the configuration record, test evidence and change steps into a package your team can present. This is evidence preparation, not an audit or certification: independent assessors decide whether the controls meet your requirements. Confirm the deliverables, retest scope and handover format in the written scope before work starts.

How DeployOpen scopes and delivers Medplum email configuration

DeployOpen plans, implements, tests and documents self-hosted Medplum email inside your own infrastructure, so invites, password resets and MFA codes arrive from a sender your team controls. Engagements are fixed-scope, with the scope, deliverables and timeline agreed in writing before work starts.

How we scope

  • Inventory which email providers, sending domains and projects need invites, resets and MFA codes.
  • Record whether mail goes through a server-level provider or per-project SMTP relays from your domain.
  • Agree in writing which templates, sender names and branding changes are in and out of scope.

How we build

  • Configure project SMTP secrets for your chosen relay, such as SES, SendGrid or another SMTP service.
  • Verify sender domain authentication records and test each system email type end to end.
  • Set custom email content and sender branding only where the agreed scope includes it.

How we hand over

  • Deliver a written runbook covering provider settings, secret locations and rotation steps.
  • Document a test checklist your team can rerun after upgrades or provider changes.
  • Walk your administrators through troubleshooting bounced, delayed or missing messages.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after handover.
  • Retest email flows after each Medplum upgrade, since the delivery path must keep working.
  • Confirm with your relay provider the quota, suppression and compliance terms that apply to your account.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.