Skip to content

Are SMTP Passwords Safe in a Browser Extension? Send As

Are your SMTP passwords safe in a browser extension? How Send As encrypts keys with a passphrase, limits Gmail's page, and what it cannot protect you from.

S

The Send As Team

4 min read

Send As never stores SMTP passwords in the extension. They live as secrets on your own relay Worker, while provider API keys and relay secrets sit in a passphrase-encrypted vault in your browser. That answers whether SMTP passwords are safe in a browser extension for most setups, but not all of it.

Google’s notice warns that tools imitating “Send as” often need your email credentials or tokens. Here is exactly where ours go.

Where does each secret live?

Secret Lives in Readable by
Provider API key (Resend, Postmark, SendGrid, Mailgun) Extension vault, encrypted You, decrypted in memory while in use
Relay secret (your own relay) Extension vault, encrypted You
Hosted relay session Extension vault, as the sender’s secret You
SMTP login and password Secrets on your own Cloudflare Worker Whoever can access your Cloudflare account
Optional Gmail app password (IMAP copy) Secrets on your own Worker Whoever can access your Cloudflare account

This is the privacy model in short. Create keys with the narrowest permission your provider offers, such as send-only, as the manual guide advises.

How does the passphrase vault work?

When you first add an address you choose a passphrase of at least eight characters.

  • The key is derived from it with PBKDF2-SHA256, 600,000 rounds and a random salt.
  • Secrets are sealed with AES-256-GCM.
  • At rest, only ciphertext is in the browser’s extension storage. Nothing is synced to other devices.
  • After you unlock, the derived key is cached in the browser’s session memory, which clears when the browser closes, so sending doesn’t ask every time. Unlocks expire after 12 hours, and Lock wipes the cache.

The passphrase is not sent anywhere. Because it cannot be recovered, a forgotten passphrase means starting the vault again.

What can Gmail’s page do? Nothing with secrets

The content script runs on the Gmail page. That is the part most exposed to Gmail’s own scripts and to anything else running on the page, so it is deliberately weak:

  • It never receives secrets. It sends the draft to the background worker, which unlocks the vault and sends.
  • The background worker refuses unlock and lock requests that come from a content script. Only the extension’s own pages can unlock.
  • Only trusted clicks and keys can trigger a relayed send. A click that a script makes with JavaScript is swallowed, not sent, so a page script cannot send mail for you by clicking Send.
  • Each send carries an attempt ID, so a repeat returns the first result instead of sending twice.

These rules are enforced in code and covered by tests in the repository, which you can read. They narrow the attack surface; they do not make the page trustworthy.

How are relay credentials protected?

If you deploy your own relay, the SMTP login and password stay on the Worker. The extension holds only the relay secret, and the relay refuses every request without it and every From address you did not list. With STARTTLS, if the server doesn’t offer it, the relay stops before sending the password and never falls back to plain text.

The relay keeps no logs of messages and uses no storage; the details are in the relay docs.

What can’t we protect you from?

Plainly:

  • A compromised computer or browser profile. The passphrase protects the stored key at rest, not while the vault is unlocked. Malware running as you can read what the extension can.
  • A malicious update. Any extension can ship one. The code is open source (MIT) so you can review or build it yourself, but we cannot promise you will notice.
  • A weak or reused passphrase. The 600,000 rounds slow guessing; they do not rescue a bad passphrase.
  • Your provider. It sees every message you send through it.
  • A Gmail app password. If you enable the optional IMAP copy, whoever holds that password can read your whole mailbox over IMAP, not just Sent. It is optional and off by default. The default copy (BCC plus a filter) needs no Gmail credential.
  • Whoever can open your Cloudflare account, since your relay’s secrets live there.
  • The hosted relay, if you choose it. Then your message passes through a server we run. It stores accounts, verified domains and subscription state, never message content or logs. See hosted vs manual.

How can you check this yourself?

Open your browser’s developer tools and watch the extension’s requests: you should see calls only to your own provider or relay (and DNS-over-HTTPS lookups for the SPF/DKIM/DMARC check), unless you chose the hosted relay. Read the source in the repository, and look at the manifest’s permission list.

Is a browser extension a bad place for secrets at all?

Not necessarily, but it is a place with trade-offs. The alternative to an encrypted vault is asking you to paste a key every time, which people avoid by saving it in a note or a password manager’s plain field. The vault keeps one encrypted copy and unlocks it only through the extension’s own pages.

That said, the safest key is a limited one. Use a send-only API key, or an app password that you can revoke at your provider without touching your main account. If a key leaks, revoking it takes seconds and your mailbox stays yours.

What to do next

Use send-only API keys or app passwords, pick a long passphrase and lock the vault when you are done. Then set Send As up or review the limits first.

Frequently asked questions

Does Send As store my SMTP password in the browser?

No. SMTP and IMAP passwords exist only as secrets on your own relay Worker in your Cloudflare account. The extension stores API keys and relay secrets, encrypted in a passphrase vault, never your SMTP password itself.

How are keys encrypted in the Send As extension?

With a passphrase you choose. The key is derived using PBKDF2-SHA256 with 600,000 rounds and a random salt, and the secrets are sealed with AES-256-GCM. Only ciphertext is stored at rest, and nothing is synced.

Can Gmail's page or the content script read my keys?

No. The background worker refuses unlock and lock requests that come from the Gmail content script, and the script never receives secrets. Only the extension's own pages, such as settings, can unlock the vault.

What happens if I forget my Send As passphrase?

Nobody can recover it, including us. You would reset the vault and re-enter your keys. This is by design: a recoverable passphrase would mean someone else holds a way into your vault.

Keep reading