Google SMTP relay, and why an agent cannot set it up for you

Google's SMTP relay service routes outbound mail from devices, applications and internal servers through Google Workspace infrastructure. It uses smtp-relay.gmail.com and is configured in the Admin console, which distinguishes it from ordinary Gmail submission through smtp.gmail.com. Only a Workspace admin can create that relay entry, so an AI agent that wires app mail into code cannot set the relay up for you, and once it sends, Google reports no delivery status back to it.

VerifiedBy Kam Low, Co-founder and CTO·Updated

Two different services

The distinction matters because the names are similar and the capabilities are not.

Google's two SMTP endpoints

easy to conflate, different capabilities
smtp-relay.gmail.com
smtp.gmail.com
What it is
A Workspace admin feature configured in the Admin console
Ordinary submission by one signed-in mailbox
Authenticates by
Registered IP address or credentials
Mailbox credentials
Sends as
Any address in the organization's domains
That user only
Available to
Workspace tenants
Personal and Workspace accounts
Both accept 587 with STARTTLS or 465 with implicit TLS.
Sends as the domain
Sends as one user
smtp-relay.gmail.com
Workspace admin feature
configured in the Admin console
accepts mail from registered IPs
sends as the domain
smtp.gmail.com
one mailbox authenticating
personal and Workspace accounts
sends as that user
Both accept
587 · STARTTLS  or  465 · implicit TLS
Google runs two SMTP endpoints that are easy to conflate. The relay is an admin-configured Workspace service that sends as your domain. The other, smtp.gmail.com, is one signed-in mailbox.

The SMTP relay service, at smtp-relay.gmail.com, is a Workspace administrative feature. It accepts mail from configured senders, can authenticate by IP address rather than credentials, and can send as any address in the organization's domains. Google documents it under SMTP relay service.

Ordinary Gmail submission, at smtp.gmail.com, authenticates as one mailbox and sends as that user. It is available to personal accounts and Workspace accounts alike.

Choosing between them comes down to whether the sender is a person or a system. A printer, a monitoring service or an internal application belongs on the relay. A mail client belongs on standard submission.

The Google question is not hypothetical for us. 78% of our users live in a Google mailbox, counting 52% plain gmail.com signups and 110 custom domains on Workspace MX, and Microsoft 365 is around 5%. Most senders deciding between these two endpoints are already inside Google infrastructure.

Server settings

The relay accepts connections on port 587 with STARTTLS, port 465 with implicit TLS, or port 25. Of those, 587 is the recommended configuration.

Port 25 is available on this service and is not a good default. Most networks and hosting providers block outbound 25, and it is the option to use only when a legacy device supports nothing else.

Authentication is either SMTP credentials or a registered static IP address. The IP-based option exists for devices that cannot hold credentials, and it requires the address to be static and not shared with anyone outside the organization.

What an agent does differently with the Google SMTP relay

A Workspace admin sets the relay up once, for a printer, a scanner or an internal tool, and then nobody touches it. An AI agent or a coding assistant meets it differently. Asked to make an app send email, it finds smtp-relay.gmail.com in an existing config and wires the same host into new code, runs the sends on a schedule nobody watches, and retries when the relay says no.

Three things on this page matter more once an agent is the sender.

  1. The agent cannot create the relay entry. The policy lives in the Google Admin console, and only a Workspace admin can add or change it. Code an agent points at the relay before that entry covers it is rejected in a way that reads as a credential problem, so an agent can spend its effort changing credentials instead of asking for the setting.
  2. IP trust follows the address, not the code. When the relay authenticates by IP, it trusts one registered static address. Code an agent deploys to a different host sends from whatever address that host has, and the relay has no reason to accept it until an admin registers that address too.
  3. Nothing comes back to read. The relay returns no delivery events, bounce classification or suppression handling, and a quota block shows up as intermittent failures. An agent running unattended has no status to check, so a failure looks like a reason to try again.

The relay is still the right home for the organization's own devices. For mail an app sends, which an agent will build, change and retry, the sender needs credentials it can hold and a status it can read, which is what a transactional email API gives it.

Configuration

Setup happens in the Google Admin console rather than on the device. Under Apps, Google Workspace, Gmail, Routing, the SMTP relay service entry defines who may send through it.

Three settings define the policy. Allowed senders determines whether mail may come only from registered Workspace users or from any address in the organization's domains. Authentication selects credentials, IP allowlisting, or both. TLS encryption can be required, which rejects any connection that does not negotiate it.

Configure the device only after the Admin console entry exists. A device pointed at the relay before the policy is in place is rejected in a way that reads as a credential problem.

Limits and suitability

The relay carries per-user and per-organization sending caps published by Google, and they are sized for internal business mail rather than for bulk sending.

Exceeding them results in temporary blocking rather than a clear error, which presents as intermittent failures that are difficult to attribute to a quota.

Mail sent through the relay is still subject to Google's requirements as a receiver when it reaches Gmail addresses. Bulk senders must authenticate with SPF, DKIM and DMARC, keep the user-reported spam rate below 0.10% and never reach 0.30%, and support one-click unsubscribe, per the sender guidelines.

George Hartley, Nitrosend co-founder, built his Email Marketing Bible from 908 sources and the six billion emails SmartrMail sent, and it adds the reputation detail Google's own page does not. For Gmail, domain reputation matters more than IP reputation, and that memory runs about 120 days. A dedicated IP only earns its keep past one million emails a month, which is a scale no Workspace relay sender should be at anyway.

For application mail at scale the relay is the wrong tool. It is designed to let an organization's own devices send through infrastructure it already pays for, not to provide delivery events, bounce classification or suppression handling, none of which it reports back.

The relay's real limitation is that it reports nothing back and assumes a person is watching the outcome. An AI agent sending through Nitrosend does not inherit that gap: every send returns a status the agent can read, not a message lobbed at Gmail's infrastructure on the hope it lands. That is the actual difference between using Google's relay and using a platform built for an agent to run the mail program end to end.

Worked example: moving app mail off the relay

The prompt, in the user's words: "Our servers relay app mail through smtp-relay.gmail.com. Move it to something an API key controls."

Before. Unguided, an agent keeps the shape it found. The app keeps connecting to smtp-relay.gmail.com on port 587, the send sits inside a retry loop, and when a new deploy is rejected the agent asks for the relay policy to be loosened so the error goes away. Product mail keeps running on caps Google sized for internal business mail, and no delivery events reach the app.

After. With the Nitrosend MCP server connected, the agent works through the calls in this order:

  1. nitro_get_status gets the current account context, sender identity and readiness, so the agent knows what is already set up.
  2. nitro_manage_domains adds and verifies a customer sending domain, a subdomain you own, so app mail stops depending on the Workspace relay policy.
  3. nitro_manage_template creates a reusable email template for the app email the relay used to carry.
  4. nitro_review_delivery runs a read-only review of that template, with validation, spam analysis, preflight and previews. It never approves or sends.
  5. nitro_send_test_message sends one real email test for the template. It never sends to an audience. A person reads that test before the app makes any live send. Approval through nitro_control_delivery covers campaign and flow delivery, not a single transactional send.
  6. nitro_send_message sends one transactional email now, with an idempotency_key that is reused only for an exact retry. In the app, the handler that used to open an SMTP connection to Google makes the same kind of send through the REST API with an API key.
  7. nitro_get_insights gets email analytics once the first real app emails have gone out, so the agent can confirm the new path is sending.

The end state is a verified domain and an API key that belongs to the app, with no Admin console change needed for the next deploy. The relay entry stays in place for the devices that need it, and an admin can remove the app's registered address from it once the new path has sent its first real email.

Where it goes wrong when an agent leans on the relay

The setup guides stop once the device connects. These are the ways an agent sending app mail through the relay turns a working setup into a problem.

  • Relay rules widened to unblock an agent. When new code is rejected, the quick fix is to loosen the policy: allowed senders switched from registered Workspace users to any address in the organization's domains, TLS no longer required, more addresses registered. Each change lets more traffic send as the domain, and none of it was reviewed as a mail decision.
  • Product mail on Workspace limits. The relay's per-user and per-organization caps are sized for internal business mail. A signup spike or a retry loop can reach them, and the temporary block that follows hits every printer and internal tool sending through the same organization, as intermittent failures that are hard to attribute to a quota.
  • Credentials or IP trust nobody reviews. SMTP credentials an agent writes into a .env file, a config file or a CI log can send as the domain from anywhere. A registered IP stays trusted in the Admin console after the workload that needed it has moved or gone.
  • Sends nobody checked. The relay passes no delivery events, webhooks or automatic suppression back to the sending app, so an agent keeps sending to addresses that fail, and the damage can surface first as the domain's reputation at Gmail.

The full Gmail-side settings for a single mailbox, which is the other path an agent may reach for, are on Gmail SMTP settings, and the wider port choices are on the SMTP ports guide.

What to send app mail through instead

App mail goes through the email API, the CLI or the MCP server, with an API key the app holds. There is no Admin console entry to request and no registered address to keep in step with each deploy.

  • A verified sending domain. nitro_manage_domains adds, verifies and diagnoses a customer sending domain. Nitrosend co-founder George Hartley advises setting up the DNS records for any send over about 50 recipients, because Gmail's spam detection may otherwise flag unauthenticated mail.
  • Review before anything reaches a person. nitro_review_delivery is read-only and never sends, and nitro_send_test_message sends one test that never reaches an audience.
  • Safe retries. nitro_send_message takes an idempotency_key, reused only for an exact retry, so a retry loop does not send the same email twice.
  • A status to read. Delivery outcomes come back through webhooks and nitro_get_insights, which is the part the relay never reports.

Sending allowances depend on the plan and on sender standing, and they are listed on the pricing page.

Go deeper

First send in thirty seconds.

Simple pricing. Unlimited contacts.

Every plan includes full stack emailing: Flows, Newsletter Campaigns and Transactional Email, plus our NitroWheel LLM and all agent integrations (Claude, ChatGPT, Codex, Cursor and others). Pay for what you send, not who you store.

Choose your billing interval

Every paid plan includes 3 agent inboxes and no Nitrosend footer.

Starter

For your first email program.

$16USD / month

$192 billed yearly.

20,000 emails / month

Choose Starter
  • 5 brands · 3 seats
  • 5 custom sending domains
  • 500 email verifications/month
  • $1.50 / 1,000 extra emails

Pro

For a growing audience.

$40USD / month

$480 billed yearly.

60,000 emails / month

Choose Pro
  • 10 brands · 5 seats
  • 10 custom sending domains
  • 1,000 email verifications/month
  • $1.20 / 1,000 extra emails

Growth

For teams and agencies.

$120USD / month

$1,440 billed yearly.

200,000 emails / month

Choose Growth
  • Unlimited brands · 10 seats
  • 25 custom sending domains
  • 2,500 email verifications/month
  • $0.90 / 1,000 extra emails

Scale

For high-volume sending.

$240USD / month

$2,880 billed yearly.

500,000 emails / month

Choose Scale
  • Unlimited brands · 20 seats
  • 100 custom sending domains
  • 5,000 email verifications/month
  • $0.70 / 1,000 extra emails
Enterprise

Hey, big sender.

Sending 500,000+ emails a month? Get a custom plan designed for you, with volume pricing for sending, verification and enrichment.

Start free. No card needed.

5,000 emails to start, then 500 emails every month. No expiry on your starter emails.

Start free

Daily allowances depend on your plan and sender standing. Strong list, domain and delivery evidence can raise standing, including on day one. Trusted receives the full plan allowance; available email credits, safety checks and delivery pacing still apply.

Free forever. No credit card required. See full comparison →