How to configure SMTP email for a self-hosted Hyperswitch instead of AWS SES
To send Hyperswitch sign-up and login emails through your own mail provider, add an [email.smtp] section to the server configuration and point it at an SMTP-compliant service. Hyperswitch originally sent these emails only through AWS SES. It now accepts any SMTP-compliant provider, and the section takes a host, a port, a timeout and a connection type. Teams in your own infrastructure usually need this when they have no SES account, when mail must stay in a particular region or provider for data residency reasons, or when all outbound mail already runs through an internal relay that security controls and logs. Before you change anything, confirm with your mail team which host, port and authentication method the relay requires, and confirm that the relay accepts connections from the subnet where the Hyperswitch router runs.
Choose the connection type with care. The Hyperswitch SMTP documentation recommends STARTTLS, which upgrades a plain connection to an encrypted one before credentials or message content are sent. Plaintext is intended for development only, and it should never reach a production environment or a relay that carries real customer addresses. Check the exact key names and accepted values against the current SMTP documentation for your release, because the configuration keys are part of the server config and the defaults should not be assumed. Verify that the timeout is long enough for your relay under load but short enough that a stalled mail server does not hold up login requests. Keep SMTP credentials in your secrets store rather than in a values file committed to Git, and confirm how your deployment tool injects them.
Test the configuration before any user depends on it. Run a local mail catcher, such as a development SMTP server that captures messages without delivering them, and send a sign-up and a login email to it using plaintext so you can confirm the template, the sender address and the link destination. Then repeat the test against your production relay with STARTTLS enabled, using a test mailbox you control. Check the server logs for connection and authentication errors, and confirm that messages arrive in the inbox rather than the spam folder. Record the relay host, the connection type and the test results in your change record so that auditors and the security team can see how outbound email was configured and verified.
Which SMTP settings to set and when each fits
This table lists the [email.smtp] keys named in the Hyperswitch SMTP docs, what each controls, what a production value depends on, and when each connection type fits. Read it as a checklist: confirm each value with your mail provider and against the release running in your environment before you set it. The main takeaway is that STARTTLS is the production choice, and plaintext belongs only in a local test setup.
| Setting | What it controls | What production depends on | When to use it |
|---|---|---|---|
| host | The SMTP server that Hyperswitch connects to when it sends sign-up and login emails | The relay host name your email provider gives you for your sending account, not a generic address | Set it to the relay your provider confirms. For local testing, point it at a mail catcher on your test network |
| port | The TCP port used for the SMTP connection | The submission port your provider documents for authenticated sending, confirmed with the provider | Use the port that matches your connection type. Ask the provider which port carries STARTTLS for your account |
| timeout | How long Hyperswitch waits on the SMTP server before treating a send as failed | Latency between your cluster and the relay, and your provider's own response times | Keep a value that lets normal sends finish but surfaces a stuck relay quickly. Test it under your real network path |
| connection type: starttls | Opens a plain connection, then upgrades it to an encrypted TLS session before sending credentials and messages | A relay that offers STARTTLS on the port you configured, with a certificate chain your cluster trusts | Recommended for production. Confirm the accepted value spelling in the Hyperswitch SMTP docs for your release |
| connection type: plaintext | Sends SMTP traffic with no encryption | Nothing suitable for production, since credentials and email content cross the network unprotected | Development and local testing only, for example against a mail catcher inside an isolated test network |
STARTTLS or plaintext: which connection type to use
The connection type decides whether Hyperswitch encrypts the mail exchange before it sends credentials or message content. The cards below cover why STARTTLS is the recommended setting, where plaintext fits, and what to verify with your provider before go-live.
Why STARTTLS is recommended
The [email.smtp] section takes a connection type, and Hyperswitch recommends STARTTLS for any sender that reaches a real mail provider. The client opens the connection in clear text, then upgrades it to TLS before it sends authentication details or message content. Set the type to match what your provider supports, then confirm the upgrade happens in test traffic and do not rely on the config file alone.
Why plaintext stays in development
The plaintext option sends the whole SMTP exchange without encryption, so anyone who can observe the network path between Hyperswitch and the mail server can read it. Hyperswitch documents that plaintext is for development only. Keep it inside a local environment that talks to a mail catcher on a trusted host, and make sure the setting does not carry into staging or production values files.
Credentials and sign-in data on the wire
An authenticated relay receives a username and password during the session, and the messages it carries include sign-up and login content. Over plaintext, that material crosses the network unprotected. Review what your login and verification emails contain, including any links or codes, and store the SMTP password in your secrets store so it is injected at deploy time and never written into a values file.
How a mismatch appears
When the configured type does not match what the server offers, the failure appears during connection setup, so the first symptom is usually a sign-up or login email that never arrives. Check the router logs for SMTP connection and authentication errors, and confirm the timeout value is long enough for the handshake to finish on your network. Test the handshake from inside the cluster before you assume the provider is down.
Confirm TLS support with the provider
Ask the provider which connection types it accepts on the host and port you plan to use, whether it requires the upgrade to TLS before authentication, and which certificate chain it presents. Confirm that the certificate name matches the host value. Ask whether it refuses plaintext connections and what it logs and retains for SMTP sessions, since those answers shape your data handling review.
Test in a staged order
Point a development stack at a local mail catcher with plaintext, confirm that sign-up and login messages arrive, and check the rendered content. Then repeat the test against your provider in a non-production environment with starttls, so the upgrade path runs before go-live. Record the verified settings and carry the same connection type into the production values.
Setting up the SMTP section and testing it
This sequence moves Hyperswitch sign-up and login emails from AWS SES to your own SMTP relay, using a STARTTLS connection in real environments. Each step ends with a check so you can confirm the change works before it reaches production.
Collect relay details from your SMTP provider
The platform or messaging team gets the relay host, port, and login credentials from the SMTP provider, and confirms the provider allows sending from the sender domain used for Hyperswitch emails. Ask the provider which connection types it supports on that port and whether it requires STARTTLS. Store the credentials in your secrets store rather than in a values file committed to Git. The step is done when someone can open a connection to the relay from the network where Hyperswitch runs.
Add the email SMTP section
The engineer adds an [email.smtp] section to the Hyperswitch configuration for the target environment, setting the host, port, and timeout values from the provider. Set the connection type to starttls for any real environment, and reserve plaintext for local development only. Check the Hyperswitch SMTP documentation for the exact key names in your release, since the section structure is the part of the configuration you must match. The step is done when the change is reviewed and the values for each environment are recorded.
Disable the AWS SES path for these emails
Remove or disable the AWS SES settings that send sign-up and login emails so that the SMTP section is the only sending path for those messages. Confirm in the configuration that no leftover SES credentials or sender identity are still referenced for these flows. Keep a record of the change so the team can explain which provider sends the emails during an audit or incident. The step is done when a configuration review shows one active email path.
Test with a local mail catcher first
Before touching a shared environment, the engineer runs Hyperswitch locally with plaintext connection settings pointed at a local mail catcher, which receives messages without delivering them to real inboxes. Trigger a sign-up and a login email and confirm both appear in the catcher with the expected sender and content. Plaintext is acceptable here only because the traffic stays on the developer machine. The step is done when both test emails arrive in the local catcher.
Deploy the change through your install path
The platform team rolls out the configuration change through the install path the environment uses, such as the Helm values, a GitOps repository, or a Terraform-managed secret. Use the same change process you use for other Hyperswitch configuration so the rollout is recorded and can be reverted. Watch the Router pods restart cleanly and confirm the configuration is loaded from the expected source. The step is done when the rollout completes without failed pods in the target namespace.
Trigger sign-up and login emails
A tester uses a non-production account to sign up and then log in to the Control Center, which should cause Hyperswitch to send both emails through the relay. Confirm each message reaches the test mailbox, check that the sender and links point to the correct environment, and check the spam folder if messages do not appear. Repeat the test with a second mailbox provider to catch filtering problems early. The step is done when both emails arrive in the test mailbox.
Check server logs for connection errors
The operator reviews the Router logs for the sign-up and login test window and looks for SMTP connection, TLS handshake, authentication, or timeout errors. Any error that appears in logs but not in the mailbox usually points to a retry or a partial delivery, so check the relay's own delivery records as well. Record the working host, port, and connection type for the runbook. The step is done when the logs show successful send events and no unexplained SMTP errors.
Testing sign-up and login emails with a local mail catcher
Before you point a production-bound instance at your own SMTP service, you can check sign-up and login emails against a local mail catcher. A mail catcher is a development tool that accepts SMTP traffic on a local port and holds the messages for you to inspect, so nothing reaches a real inbox. Set the [email.smtp] section of your development configuration to the catcher's host and port, set the connection type to plaintext, and trigger a sign-up and a login from the Control Center. The messages should appear in the catcher with the expected subject lines, sender address and links. If they do not, check the host and port first, then the connection type, because a mismatch in either will stop delivery before any message is sent.
Plaintext is acceptable here only because the traffic never leaves your development machine or lab network. Plaintext sends credentials and message content without encryption, so the same setting must never reach a shared, staging or production environment. Keep the plaintext value in a development-only overlay or local configuration file, and make sure your production values use the STARTTLS connection type that the Hyperswitch SMTP documentation recommends. Do not run a mail catcher in production, and do not point production sign-up or login flows at it, since messages would be lost and the sign-up and login links in them would never reach users.
Confirm the catcher's listening port, whether it requires or ignores SMTP authentication, and whether it accepts plaintext connections without a TLS handshake, against that catcher's own documentation before you rely on the results. Some tools use a non-standard port or require a username and password even when they are only local. If the catcher demands authentication that your configuration does not supply, delivery will fail in a way that looks like a Hyperswitch fault. Record the settings you used, so the same test can be repeated after a configuration change or a Hyperswitch upgrade.
How a sign-up email travels from Hyperswitch to your mail provider
The flow starts when a user signs up or logs in through the Control Center, and Hyperswitch builds the email. The application reads the [email.smtp] section of its configuration, which holds the host, port, timeout and connection type, then opens a connection to your SMTP relay. The relay, outside your cluster, hands the message to the recipient. Check the trust boundary: credentials and the connection type are set on the Hyperswitch side, while delivery, sender domain and bounce handling belong to your mail provider.
Email path from the Control Center through the SMTP relay to the recipient, with the trust boundary marked.
Security considerations for SMTP credentials and mail flow
Email from a self-hosted Hyperswitch carries account access and invitation links, so the SMTP connection is part of your security boundary. The cards below are items to confirm in your own environment, not guarantees from the product.
Keep SMTP credentials out of values files
The [email.smtp] section needs a username and password for your mail provider. Avoid writing those values in plain text in values.yaml or any file committed to Git. Instead, load them from a secrets store your platform already uses, and confirm how the chart injects them into the router pods. Check who can read the Kubernetes secret and whether rotation is part of your runbook.
Restrict which hosts the cluster can reach
Limit outbound traffic from the Hyperswitch namespace so that pods can only open connections to your approved SMTP host and port. Confirm this with your network policy or egress firewall, and check whether an egress proxy sits in the path. A pod that can reach arbitrary SMTP servers could send mail through an unapproved relay using your configured identity.
Use STARTTLS so credentials stay encrypted
Hyperswitch documents STARTTLS as the recommended connection type, and plaintext as suitable only for development. Set the connection type to STARTTLS and confirm that your provider presents a valid certificate that the router trusts. Test the connection before go-live, because a plaintext fallback during testing can carry over into production values by mistake.
SMTP integration docsProtect links in logs and mail
Sign-up invitations and login emails contain links that grant account access. Review how your log pipeline handles application logs from the router and whether email bodies or full URLs are recorded. Restrict who can read mail logs at your provider, and set short expiry on the links where the product allows it. Confirm these settings in a test environment before real invitations go out.
Review SPF, DKIM and DMARC settings
Receiving mail servers use SPF, DKIM and DMARC to decide whether messages from your sender domain are genuine. Ask your mail provider which records you must publish for the sending domain, and confirm that DKIM signing is enabled. Confirm the DMARC policy you intend to enforce and monitor reports before tightening it, so that legitimate onboarding mail is not rejected.
Questions teams ask before configuring SMTP for Hyperswitch
Can our own team configure SMTP for a self-hosted Hyperswitch without outside help?
Yes, if your team already runs Hyperswitch and can edit its configuration. The change itself is an [email.smtp] section with host, port, timeout and connection type, so the technical work is small. What your team needs is credentials for an SMTP service your organization approves, write access to the configuration that your deployment reads, and a non-production environment where sign-up and login emails can be sent and checked before production. Confirm with your mail provider which sending domain, sender identity and authentication method it requires, since those settings sit outside Hyperswitch and often take the longest to approve.
How long does SMTP setup take, and what makes it take longer?
The configuration edit is quick, so the duration is driven by the work around it. The main delays are provider onboarding (account approval, sending domain verification and credential issuance), DNS changes for sender authentication, and testing across each environment you run. Each environment may need its own credentials and sender settings, so a sandbox, integration test and production setup multiply the checks. Ask your team or any partner to list those dependencies in the plan and to confirm which of them depend on people outside engineering, such as a DNS or security approver.
What does it cost to send Hyperswitch emails through our own SMTP service?
The cost has three parts. The mail provider charges for sending volume and plan features, and that recurs monthly or per message depending on the provider. Internal effort is one-time for the initial setup and recurs when credentials rotate or the provider changes. External effort, if you hire a partner, is one-time and follows the written scope. Costs rise with the number of environments, the number of teams that need access to the mail account, and any extra authentication or monitoring you require. No supplied figure gives a specific price, so ask your provider for its current plan terms and ask any partner for a fixed-scope quote that lists each environment separately.
Can we keep AWS SES in place while using a different SMTP provider?
The supplied Hyperswitch documentation says the platform originally sent sign-up and login emails only through AWS SES and now supports any SMTP-compliant provider. That means SES is not required, but whether you can keep it depends on your environments and your policy. Some teams keep SES for one environment and use another provider elsewhere, while others move every environment to one provider. Confirm which sending identities, domains and credentials each environment uses, and whether your security team has approved the new provider for customer-facing email before you cut over.
Should we use STARTTLS or plaintext for the SMTP connection?
Use STARTTLS for any environment that handles real customer or employee addresses. The Hyperswitch SMTP documentation recommends the STARTTLS connection type and describes plaintext as suitable for development only. Plaintext sends mail content and credentials without encryption, so it belongs only on a local mail catcher or an isolated test network. Before go-live, confirm that the provider's SMTP endpoint accepts STARTTLS on the port you configure and that the timeout value suits your network path, since a blocked or slow route will show up as failed login emails.
How do we test Hyperswitch SMTP settings before production?
Test in a local mail catcher first, then in a shared test environment that sends to a controlled mailbox. A mail catcher receives messages without delivering them, which lets your team confirm sign-up and login emails are generated and that the configured host, port and connection type are read correctly. Plaintext is acceptable there because no real mail leaves the environment. Next, run the same sign-up and login flows against your real provider in a non-production environment, check that messages arrive and pass sender authentication, and repeat the checks after each configuration change or credential rotation.
What should we ask a partner for in a fixed-scope SMTP quote?
Ask for a written scope that names each environment, the SMTP provider and account setup it covers, and who completes DNS and provider approval steps. The quote should list the configuration changes to the [email.smtp] section, the connection type used in each environment, the test plan with the mail catcher and a live provider check, and the handover of credentials and runbooks. Ask what is excluded, such as ongoing mail deliverability monitoring or changes to the Control Center, and what must be confirmed by your organization before work starts. Most engagements are fixed-scope, so the agreed scope and timelines should be in writing before any work begins.
When a partner helps with SMTP and email delivery
A partner is most useful when email delivery touches several environments, several relays or a regulated mail process. A single team can usually point the [email.smtp] section at one provider and test a sign-up in an afternoon. The work grows when sandbox, integration test and production each need their own relay, sender domain and credentials, and when the Control Center invitation flow, which depends on email, has to be exercised end to end in each one. Outside help is also worth considering when the organization is moving off AWS SES and must prove that no environment still falls back to it, or when the mail provider's logs, retention and data processing terms must be reviewed by the compliance team before any customer email leaves your network.
The work a partner typically covers is mapping each environment to its relay settings, including host, port, timeout and connection type, and confirming with the mail provider which connection types it supports on the ports you plan to use. It also covers keeping starttls as the required setting outside development, removing plaintext from every non-local configuration, storing SMTP credentials in your secrets tooling rather than in values files, and writing a test plan that covers sign-up, login, invitation and password flows. Ask any partner to show how they will verify the sending domain, handle bounces and rate limits, and document who owns each relay account after handover.
Before you engage anyone, confirm three things yourself: which mail provider and sending domains your organization has already approved, whether your security team requires specific logging or retention for mail traffic, and which Control Center users must be able to receive invitations in each environment. Those answers determine the scope of the work and the quote. Any fixed-scope agreement should list the environments, the relay accounts in use and the acceptance tests in writing, so the handover is checkable by your own team.
How DeployOpen scopes and delivers SMTP configuration
The sequence below takes an agreed scope to a tested email.smtp configuration in your own infrastructure, with handover documentation your team can run without us.
Agree the written scope and email requirements
Before any work starts, DeployOpen and your team agree the scope in writing. We confirm which emails Hyperswitch must send at sign-up and login, which SMTP provider or internal relay you will use, the sender identity and domain, and who owns the mail account credentials. The step closes when the signed scope names the deliverables, the environments covered and the acceptance tests, so that nothing is assumed about your mail infrastructure.
Review the current email path and sender setup
We review how your Hyperswitch deployment currently sends email, including any AWS SES dependency, and check the sending domain settings your mail provider requires. Your team confirms who can change DNS records and relay allow-lists. The step closes with a short written inventory of the current configuration and the gaps to close before the SMTP section is changed.
Choose the connection type with your security team
Together with your security and infrastructure teams, we decide the connection type for the [email.smtp] section. Hyperswitch documents STARTTLS as the recommended option and plaintext only for development, so production targets should use STARTTLS unless your relay has a documented reason otherwise. We record the host, port and timeout values your provider specifies. The step closes with an approved connection decision that is traceable to a named owner.
Configure the email.smtp section in your infrastructure
DeployOpen sets the email.smtp values in the configuration your deployment already uses, inside your own cloud accounts, data center or air-gapped network. Credentials go into your existing secrets mechanism rather than plain configuration files. Changes are made in non-production first, and each change is reviewed by your team. The step closes when the configuration is merged, deployed to the agreed environment and the rollout record names the version changed.
Test with a local mail catcher and your relay
We test in two passes. First, a local mail catcher receives sign-up and login messages so that message content, links and headers can be checked without sending anything externally. Second, the same flow runs through your production relay with an approved test mailbox. The step closes when both passes record the emails received, the connection outcome and any failures with their fixes, and your team has signed off the results.
Document the configuration and handover
We deliver handover documentation covering the email.smtp settings, where credentials are stored, how to rotate them, the test procedure, and the troubleshooting steps for common relay failures. Ownership of the mail account and DNS records is recorded. The step closes when your operations team has walked through the document and confirmed they can repeat the test without DeployOpen.
Agree optional retainer support after go-live
If your team wants ongoing help, DeployOpen can offer a retainer covering mail configuration changes, provider migrations and retesting after Hyperswitch upgrades. The retainer scope, response expectations and fees are agreed in writing separately from the initial scope. The step closes when you decide whether to continue with a retainer or run email support in-house with the handover documentation.

