emcognito
Back to Blog

Email Alias API vs. SMTP Relay: What Each One Actually Does in Your Stack

October 3, 2026

Updated

email alias APISMTP relayprogrammatic email routingdeveloper email infrastructureemail aliasingtransactional email

Keep your real inbox private.

Unlimited aliases, free. No credit card, passwordless sign-in.

Create a free alias →

When architects evaluate an email alias API vs SMTP relay, they are comparing two completely different directions of mail flow. An email alias API provisions and manages inbound forwarding addresses that route messages to an underlying mailbox, while an SMTP relay accepts outbound messages generated by your application and delivers them across the internet to external recipients.

Choosing between them is not a matter of vendor preference; it is a question of mail direction. If your application needs to receive messages at unique, isolated addresses without maintaining mail servers, you need an alias API. If your application needs to send password resets, invoices, or notifications to external users, you need an SMTP relay. Treating one as a substitute for the other breaks your mail architecture immediately.

The Short Answer: Inbound Identity vs. Outbound Delivery

An email alias API functions as an identity and programmatic routing layer. It creates email addresses on demand, attaches metadata to them, exposes their operational state, and silently forwards inbound mail to a designated destination inbox. Because forwarding isolates the recipient, external senders address only the alias rather than your personal mailbox.

By contrast, an SMTP relay is an outbound submission and transport layer. Standardized under IETF RFC 6409 (Message Submission for Mail), message submission separates the submission of a new message by an application from the routing between mail transport agents (MTAs). The relay takes a payload generated by your application, queues it, establishes TLS handshakes with remote mail exchangers, manages sender reputation, and records bounce events.

They sit on opposite sides of your developer email infrastructure:

  • The Alias API answers: "What identity does an external platform or user send mail to, and where does that mail get routed?"
  • The SMTP Relay answers: "How does a message originating in my application code reach someone else's mail server reliably?"

To determine what your application needs, evaluate the primary direction of your mail traffic:

  1. When your system requires incoming address isolation, tenant separation, or programmatic routing without generating outbound messages to third parties, an email alias API handles the architecture.
  2. When your system dispatches outbound alerts, verification codes, or reports to third-party recipients, an SMTP relay is required to handle internet delivery.
  3. When your application provisions dedicated contact points for inbound communication and also dispatches outbound system notices, both services operate in tandem as separate components.

Comparison: Email Alias API vs SMTP Relay

The table below summarizes the operational differences between an email alias API and an outbound SMTP relay.

Operational Dimension Email Alias API (e.g., Emcognito) SMTP Relay (e.g., Transactional Mail Vendors)
Primary Traffic Direction Inbound: Routes incoming mail to target destinations. Outbound: Submits application mail to external mailboxes.
Core Entity Managed Addresses and routing rules (lifecycle, labels, states). Message delivery queues (deliverability, throughput, logs).
Statefulness Stateful: Stores metadata, forwarding targets, and status. Stateless/Ephemeral: Dispatches jobs; purges message bodies.
Reputation Responsibility Forwarding path hygiene (SRS, SPF alignment on bounce). IP warming, DKIM signing, spam complaint suppression.
Plan Structure Documented on the Emcognito pricing page: Plus at $20/year (50 aliases/day API), Pro at $36/year (200 aliases/day API). Typically metered by total outbound messages dispatched per billing month.
Typical Integration Hook REST API to mint addresses during account creation. SMTP protocol (port 587/25) or batch transactional REST API.

What an Email Alias API Does That a Relay Cannot

An SMTP relay treats an email address as a simple string parameter in an envelope: MAIL FROM and RCPT TO, as specified in IETF RFC 5321 (Simple Mail Transfer Protocol). It does not track whether an address was created ten seconds ago, whether it belongs to a specific team, or whether it should be suspended next week.

An email alias API treats an email address as a first-class, managed resource with its own lifecycle. When your application calls an alias API, it provisions a durable identity that routes mail, maintains forwarding metrics, and toggles between active and paused states without requiring DNS modifications or server restarts.

In Emcognito, the REST API at https://api.emcognito.com/v1 provides endpoints to list and create aliases programmatically. Authentication requires an HTTP bearer token using your API key: Authorization: Bearer emk_your_key. Emcognito API keys use the literal prefix emk_ followed by 43 URL-safe characters, with no live or test split.

When creating an address via POST /v1/aliases, the API returns an HTTP 200 status code with the minted resource enclosed in an alias object:

{
  "alias": {
    "id": "al_98f1c841a2e742",
    "address": "k7x9m2p4q@emcognito.com",
    "status": "active",
    "created_at": 1790985600,
    "forward_count": 0,
    "label": "Tenant-492",
    "note": "Production billing webhook monitor",
    "source": "api",
    "category": "tenants",
    "single_use": false,
    "expires_at": 0
  }
}

As documented in the Emcognito developer documentation, created_at is an integer Unix epoch timestamp, and unset string fields return as empty strings ("") rather than null values. The address object is fully formed, enabling your backend to bind the id and address to an internal entity in your primary database.

A standard SMTP relay cannot do this. You cannot send an API command to an outbound relay instructing it to isolate an inbound address, categorize it under a billing tenant, or track how many incoming messages that specific address has forwarded. If an address receives unwanted traffic, an outbound relay offers no mechanism to pause that specific recipient while leaving the rest of your fleet running.

What an SMTP Relay Does That an Alias API Cannot

An alias API is not a transactional sending engine. If your application code needs to generate a welcome email, issue a password reset link, or push an automated PDF invoice to a customer, an alias API cannot perform that submission.

An SMTP relay handles the mechanics of outbound internet mail delivery defined under IETF RFC 5321. When your software connects to a relay over port 587 using STARTTLS, the relay assumes responsibility for:

  • MTA Queue Management: Holding messages in local queues when destination servers return temporary 4xx deferral errors (such as greylisting or rate-limiting).
  • Cryptographic Authentication: Injecting and signing DKIM headers with domain keys under IETF RFC 6376 (DomainKeys Identified Mail), ensuring alignment with your domain's published DMARC policy.
  • IP Reputation and Routing: Balancing traffic across pools of warm IP addresses so mailbox providers accept outbound mail without flagging it.
  • Feedback Loops and Suppression: Listening for abuse complaints, hard bounces (5xx codes), and unsubscribes, immediately adding bad addresses to suppression lists to protect domain reputation.

Mailbox providers enforce strict deliverability rules. An alias API deliberately does not manage outbound deliverability pipelines for your application's transactional messages. It forwards incoming traffic to your real inbox over TLS-encrypted hops, but it does not act as an open outbound submission pipe.

Where the Two Get Confused: Forwarding Is Not Relaying

Developers sometimes blur the line between these two tools because both deal with mail transport under the hood. When mail arrives at an alias, the forwarding provider receives it and dispatches it across SMTP to your underlying mailbox. Because the forwarder uses an MTA to pass the message to your real inbox, developers occasionally assume the forwarder also functions as a general-purpose relay for outbound software alerts.

The direction of the initiating hop highlights the architectural difference:

  1. Inbound Forwarding: An external third party initiates an SMTP transaction directed at an alias address. The forwarding service accepts the message, verifies that the alias is active, applies Sender Rewriting Scheme (SRS) to keep the original sender's SPF valid under IETF RFC 7208, and initiates a second SMTP transaction delivering the message to your real inbox.
  2. Outbound Relaying: Your application initiates the SMTP transaction. Your code connects to the relay using SMTP credentials or an HTTP transactional payload, presenting a message addressed to a customer. The relay accepts the message and pushes it directly to the customer's mail server.

Emcognito operates as an email forwarding service: mail transits Postfix and relays via SES directly to your verified destination address. It hides your real underlying inbox from the sender. It does not provide an open SMTP submission endpoint for your application to blast notifications to third parties.

Attempting to use an outbound SMTP relay to solve an inbound privacy or routing problem often leads to brittle setups, such as configuring an unmonitored catch-all mailbox. While a catch-all receives any message sent to a domain, it provides no address-level lifecycle controls: you cannot pause one address, you cannot trace which vendor sold a specific address to data brokers, and you have no programmatic metadata attached to individual recipients.

Technical Criteria: Which Layer Does Your System Require?

When designing developer email infrastructure, assess your functional requirements against five technical criteria.

1. Do You Need Unique Addresses per Customer, Tenant, or Test?

If your system isolates external communication by provisioning a dedicated email address for every registered vendor, project, or automated test run, you need an alias API. The alias API generates unique addresses on demand, labels them via API, and funnels incoming traffic back to a centralized monitoring inbox.

Guidance from the Federal Trade Commission highlights why identifier isolation matters: FTC guidance on how websites and apps collect and use information illustrates how shared identifiers allow third parties to link commercial profiles, browsing habits, and data leaks across different services. Using isolated aliases prevents cross-service data aggregation.

2. Does Your System Generate Outbound Customer Alerts?

If your system sends automated receipts, account confirmations, or password reset tokens, you need an SMTP relay. You must establish SPF, DKIM, and DMARC records on your sending domain so that receiving servers accept the mail. An alias API cannot replace this outbound pipeline.

3. What Are Your Volume and Cost Metrics?

Relay vendors charge based on message volume: you pay per 10,000 or 100,000 sent messages, scaling with your outbound activity. Alias APIs charge based on address creation velocity and monthly forwarded messages.

The Emcognito Free plan provides unlimited anonymous email aliases and 100 forwarded messages per month (with replies included from the delivery log and no credit card required). Paid tiers for programmatic access, documented on the Emcognito pricing page, offer higher forward allocations and developer API access:

  • Emcognito Plus: $20 per year (or $2 per month), which includes 2,500 forwards per month, composing new mail from any alias, removal of sponsor cards on forwarded messages, and developer API access at 50 alias creations per day. Source: Emcognito source.
  • Emcognito Pro: $36 per year (or $4 per month), which includes 15,000 forwards per month, a higher daily compose send cap, and developer API access at 200 alias creations per day. Yearly Pro includes three months free and is the term customers actually buy.

4. How Is Compliance and Data Retention Handled?

If your company operates under regulatory frameworks requiring long-term audit logging and message archiving, evaluate where data sits. Outbound relays typically log message metadata (recipient, timestamp, delivery status) and drop message bodies after delivery. Emcognito collects no personal information beyond a destination address and does not retain message bodies after delivery, apart from a brief hold on mail that arrives over your monthly forward cap, but it keeps the delivery and operational logs any mail service needs. That is data minimisation, not a no-log policy. If you require long-term storage of inbound messages, your destination mailbox must handle the archiving.

5. Is Mailbox Content Confidentiality Required?

Emcognito forwards mail over TLS-encrypted transport and does not read message contents or retain them after delivery, apart from a brief hold on mail that arrives over your monthly forward cap, but it is not end-to-end encrypted. For content confidentiality, pair it with an encrypted mailbox such as Proton Mail or Tuta.

Programmatic Email Routing: Integrating Both Layers

In modern architectures, applications often deploy both an alias API and an SMTP relay. The alias API manages inbound tenant communications, while the SMTP relay handles transactional notifications. Below is an integration pattern demonstrating how programmatic email routing operates across both systems.

Step 1: Provision the Inbound Identity via the Alias API

When a new tenant provisions an environment, your backend makes a POST request to the Emcognito API to mint an isolated inbound address. Emcognito aliases use the shared emcognito.com domain. Custom subdomain support is planned, but custom domains are not available today.

Here is an implementation in Node.js using standard fetch:

async function createTenantAlias(tenantId) {
  const response = await fetch("https://api.emcognito.com/v1/aliases", {
    method: "POST",
    headers: {
      "Authorization": "Bearer emk_your_key",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      label: `Tenant-${tenantId}`,
      source: "provisioning_worker",
      category: "tenants"
    })
  });

if (response.status === 429) { const retryAfter = response.headers.get("retry-after"); if (retryAfter) { console.warn(Burst limit hit. Back off for ${retryAfter} seconds.); } else { console.warn("Daily creation cap reached. Window resets at 00:00 UTC."); } throw new Error("Alias creation rate-limited"); }

if (!response.ok) { throw new Error(API error: ${response.status}); }

const data = await response.json(); return data.alias; }

Step 2: Map the Alias in Your Database

Store the returned alias.id and alias.address alongside your tenant record. While you can call GET /v1/aliases (which supports cursor-based pagination using next_cursor and last_key parameters) to list all aliases on your account, your application database should maintain the primary mapping between internal tenant records and their assigned alias addresses.

Step 3: Route Inbound Ingestion

When external parties send mail to k7x9m2p4q@emcognito.com, Emcognito forwards the message to your primary operational mailbox. Because each tenant owns a dedicated alias address, incoming messages can be filtered, categorized, or processed automatically based on the alias recipient address in the header.

Address isolation also simplifies threat analysis. According to FTC phishing guidance, organizations and individuals must scrutinize unsolicited requests for credentials and sensitive data. Isolating inbound streams by alias makes tracing compromised or leaked addresses straightforward.

Step 4: Dispatch Outbound Notifications via SMTP Relay

When your system needs to alert the tenant administrator about billing updates or security notices, do not route that message through the alias API. Instead, dispatch it using an outbound SMTP relay client configured with your authenticated domain credentials.

import nodemailer from "nodemailer";

const relayTransport = nodemailer.createTransport({ host: "smtp.relay-provider.com", port: 587, secure: false, // upgrades via STARTTLS auth: { user: process.env.RELAY_USER, pass: process.env.RELAY_PASSWORD } });

async function sendTenantNotification(recipientEmail, subject, text) { return await relayTransport.sendMail({ from: '"System Alerts" <alerts@yourcompany.com>', to: recipientEmail, subject: subject, text: text }); }

Keep these credentials completely separate in your secrets manager: your Emcognito API key belongs in identity provisioning workers, while your SMTP relay credentials belong in transactional notification workers.

Step 5: Decommissioning and Teardown

When a tenant cancels their account, their inbound identity should be disabled immediately to prevent orphaned mail ingestion.

v1 of the Emcognito API creates and lists aliases (GET and POST /v1/aliases). Suspending, resuming and deleting an alias are one-click dashboard actions today; there is no PATCH or DELETE endpoint yet. To disable an address, navigate to the Emcognito dashboard and select "Pause alias". If you confirm that the address is no longer needed, you can delete it after a confirmation prompt. Suspend the alias and the sender is cut off immediately.

Integration Pitfalls to Watch For

Engineers integrating mail systems frequently run into operational traps when crossing these boundaries. Watch for these five edge cases:

1. Conflating the Burst Rate Limit with the Daily Creation Cap

If your worker handles both errors with a naive backoff-and-retry strategy, a burst limit will resolve itself in under 60 seconds, but hitting the daily cap will cause repeated retry failures until 00:00 UTC. Your application code must distinguish between the two by checking for the presence of the Retry-After header.

2. Running Synthetic Load Tests Against the Alias API

As documented on the Emcognito pricing page, the daily creation cap is 50 aliases per day on Plus and 200 aliases per day on Pro. Running an automated end-to-end load test that provisions an alias per simulated user will deplete your daily creation quota. For high-volume automated testing, use internal mock stubs rather than minting live aliases on every integration run.

3. Expecting Outbound Bulk Delivery from an Alias

Composing a brand-new message from an alias is a paid feature available on Emcognito Plus and Pro plans, and it is designed for direct correspondence, not automated batch delivery. Composing has a daily send cap (20 a day on Plus and 100 a day on Pro, ramping up over the first 7 days). Each composed message counts directly against your plan's monthly forward quota. Attempting to use alias compose functionality as an application notification engine will quickly exhaust your allowance.

4. Assuming Mail App Replies Are Active

Replying to a forwarded message is included on every Emcognito plan, Free as well, and it happens in your delivery log: open the delivered message and choose Reply securely, and Emcognito sends it with the alias as the sender. Replying from your own mail app is paused for security and is refused rather than delivered. Composing a brand-new message from an alias is the Plus and Pro feature. If your team needs to answer incoming tenant queries, log into the dashboard delivery log to send replies securely.

5. Domain Configuration Requirements

Emcognito is closed source and runs only as a hosted service; if open source or self-hosting is a requirement, addy.io is the better fit. Emcognito aliases use the shared emcognito.com domain. Custom subdomain support is planned, but custom domains are not available today.

Cost and Operational Trade-offs

Building email infrastructure requires balancing hosting overhead against recurring SaaS costs.

Operating your own inbound mail server involves maintaining Postfix instances, configuring spam filters, managing TLS certificate rotations, monitoring blocklists, and keeping the host hardened against relay attacks. Inbound mail processing requires ongoing maintenance when handling non-standard MIME structures or spam floods. Offloading inbound identity management to an alias API removes this operational surface.

Inbound alias routing pricing reflects forwarded message volume and daily address creation velocity. According to the published rates on the Emcognito pricing page:

  • Free: Unlimited aliases, 100 forwarded messages per month, and delivery log replies. Create an account via a passwordless magic link on the signup page.
  • Plus: $20 per year (or $2 per month) for 2,500 forwards per month and 50 API alias creations per day.
  • Pro: $36 per year (or $4 per month) for 15,000 forwards per month and 200 API alias creations per day. Pro yearly provides three months free.

Operating an outbound relay has different trade-offs. Running your own outbound MTA requires dedicated IP warming, reverse DNS management, feedback loop registrations with mailbox providers, and constant deliverability triage. If an unverified user sends spam through your server, your IP will be blocklisted quickly. Paying an established SMTP relay vendor for outbound delivery offloads the deliverability and IP reputation burden.

Frequently Asked Questions

Can an email alias API replace an SMTP relay?

No. An email alias API manages inbound identity and forwarding; it creates addresses, assigns labels, and routes incoming traffic to an underlying mailbox. It cannot submit outbound transactional mail to third-party recipients, manage IP reputation pools, or process DKIM signing for application notifications.

Can an SMTP relay create and manage email aliases?

No. An SMTP relay is an outbound transport system. It accepts raw message payloads from your application and dispatches them across the internet. It has no concept of an alias lifecycle, does not store address-level metadata, and cannot selectively pause, resume, or label inbound addresses.

Does Emcognito send outbound email from an alias?

Composing a brand-new message from an alias is a Plus and Pro feature. It allows you to compose direct correspondence from any alias through the web interface, subject to a daily send cap (20/day on Plus, 100/day on Pro). Each composed message draws from your monthly forwarding quota. It is not an automated transactional sending engine for applications.

What is the difference between the burst limit 429 and the daily cap 429 on the Emcognito API?

The burst limit (60 requests per minute per key) is enforced by the rate limiter; its HTTP 429 response includes a Retry-After header stating how many seconds to wait before retrying. The daily alias creation cap (50/day on Plus, 200/day on Pro) is returned by application code; its HTTP 429 response carries no Retry-After header and clears automatically at 00:00 UTC.

Do I need both an alias API and an SMTP relay in the same application?

Only if your application handles both directions of mail. If your system provisions unique contact addresses for tenants, vendors, or test suites, you need an alias API. If your application sends transactional alerts, onboarding emails, or system notifications to external users, you need an SMTP relay. Applications that perform both functions integrate the two as independent services.

If your app needs to create aliases from code, the Emcognito developer API does that: GET and POST /v1/aliases, 50 aliases/day on Plus ($20/year) and 200/day on Pro ($36/year). See the endpoints and key format in the Emcognito developer documentation.

Sources and further reading

Bring your aliases somewhere that lets you write back.

Replies are free on every plan. Composing a brand-new message from an alias is Plus, $20 a year.

See the plans →