Back to Blog
/Updated /5 min read/By SMTPfast Team

How to Set Up Custom SMTP for Firebase Authentication

Firebase Authentication can send its verification, password reset and email change emails through a custom SMTP server. Enter sender address, host smtp.smtpfa.st, port 587, security mode STARTTLS, username smtpfast and an SMTPfast API key with the email:send scope as the password, in the console's SMTP settings or with the Identity Toolkit config API.

firebaseauthsmtptutorial
Share:𝕏in

The short answer: Firebase Authentication can send its emails (address verification, password reset, email address change) through a custom SMTP server. In the Firebase console, open Authentication, then the Templates tab, and fill in the SMTP settings:

Sender address:  [email protected]   (on a domain verified in SMTPfast)
SMTP server host: smtp.smtpfa.st
Port:            587   (or 2525)
Security mode:   STARTTLS
Username:        smtpfast
Password:        an SMTPfast API key with the email:send scope

The same settings can be set with the Identity Toolkit config API, shown below.

We build SMTPfast. The Firebase settings below come from Google's Identity Toolkit API reference and the Firebase docs, checked on 22 November 2026; the links are at the end.

Why change the sender

By default Firebase sends Authentication email itself, from an address on your project's Firebase domain. The Firebase docs let you change the sender name, sender address and reply-to per template, and use a custom domain, which you verify with DNS records. Custom SMTP goes one step further: the email leaves through your provider, so it shows in the same log as your other mail, uses your domain's SPF, DKIM and DMARC, and follows your provider's bounce handling.

Step 1: verify your sending domain in SMTPfast

  1. In SMTPfast, open Domains and add the domain you will send from, for example auth.yourdomain.com.
  2. Publish the records SMTPfast shows: three DKIM CNAME records, an SPF TXT record, a DMARC TXT record, and an MX and a TXT record for the bounce. subdomain. On Cloudflare, Connect Cloudflare adds them for you.
  3. Click Verify Now and wait for the domain to show as verified.

See Domains. You can check the records with the SPF, DKIM and DMARC checkers.

Step 2: create an API key

Open API Keys in SMTPfast and create a key with only the email:send scope. Name it after the Firebase project. It is the SMTP password; the username is always smtpfast. Set SMTP mail without a category header to Transactional, so Firebase email is sent as transactional.

Step 3: enter the SMTP settings

In the console, the SMTP settings are on the Templates tab of Authentication. Use the values above, and choose STARTTLS as the security mode: SMTPfast does not listen on port 465.

The API route sets the same fields. The smtp object of the project config has senderEmail, host, port, username, password and securityMode (SSL or START_TLS), and method: "CUSTOM_SMTP" turns it on:

PROJECT_ID=your-project-id

curl -X PATCH \
  "https://identitytoolkit.googleapis.com/admin/v2/projects/$PROJECT_ID/config?updateMask=notification.sendEmail.method,notification.sendEmail.smtp" \
  -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  -H "x-goog-user-project: $PROJECT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "notification": {
      "sendEmail": {
        "method": "CUSTOM_SMTP",
        "smtp": {
          "senderEmail": "[email protected]",
          "host": "smtp.smtpfa.st",
          "port": 587,
          "username": "smtpfast",
          "password": "'"$SMTPFAST_API_KEY"'",
          "securityMode": "START_TLS"
        }
      }
    }
  }'

If you use multi-tenancy with Identity Platform, the Firebase docs say each tenant must be set to inherit custom SMTP settings, or its users keep getting email from the default sender.

Step 4: test it

  1. Trigger an email from your app with an address you can read: sendPasswordResetEmail() or sendEmailVerification() in the Firebase client SDK.
  2. In SMTPfast, open Emails. The message shows with its status and every delivery attempt.
  3. Open the original message in the inbox (in Gmail: Show original) and check that SPF, DKIM and DMARC pass for your domain. The email header analyzer reads the headers for you.

Know this before you go live: category and tracking

SMTPfast sorts every email into marketing or transactional. Over SMTP, a message can pick its category with an X-SMTPfast-Category header, but the Firebase SMTP settings have no field for custom headers. A message without the header takes the category set on its API key, so Firebase Authentication email is transactional when its key is set to transactional:

  • It has no one-click List-Unsubscribe header.
  • A recipient who unsubscribed from your marketing email still gets it. Bounced and complained addresses are still skipped.

Keys are marketing unless you change them. To switch a key you already use, open API Keys, Edit on the key and choose Transactional. Use this key only for Firebase email, and another key, left on marketing, for any newsletter you send over SMTP. See SMTP mail and categories.

Click and open tracking follow your SMTPfast account settings, so with click tracking on, the action link in the email goes through the click tracker before it reaches Firebase. To send links as written, turn off click tracking in Settings, Email Tracking; that applies to the account's other marketing email too. See Tracking per email.

Common errors

What you see Cause and fix
535 Authentication failed The username must be exactly smtpfast, and the password the full API key. The key must have email:send and must not be revoked.
550 Domain ... is not verified The sender address is not on a verified SMTPfast domain.
Connection fails with security mode SSL SMTPfast has no implicit TLS port. Choose STARTTLS with port 587 or 2525.
451 with a limit message Your SMTPfast hourly limit or first-week stage was reached. See Rate limits. Firebase has its own Authentication limits as well.
550 All To recipients are suppressed The address bounced or complained before. See Suppressions.
Mail lands in spam Check that SPF, DKIM and DMARC pass, and that the sender address is on the domain you verified.

Sources

Checked on 22 November 2026:

Other auth guides: Supabase Auth, Clerk, Better Auth and Auth.js / NextAuth.

Frequently asked questions

Does Firebase Authentication support custom SMTP?

Yes. The project's Identity Toolkit configuration has a custom SMTP option (method CUSTOM_SMTP) with sender email, host, port, username, password and a security mode of SSL or START_TLS. The Firebase console shows the same settings on the Templates tab of Authentication.

What are the SMTPfast settings for Firebase?

Host smtp.smtpfa.st, port 587 (or 2525), security mode STARTTLS, username smtpfast, and an SMTPfast API key with the email:send scope as the password. The sender address must be on a domain you verified in SMTPfast.

Should I choose SSL or STARTTLS in Firebase?

STARTTLS. SMTPfast accepts SMTP on ports 587 and 2525 with STARTTLS and does not listen on port 465, which SSL mode usually uses.

Are Firebase Authentication emails sent as transactional?

Yes, when the API key Firebase uses is set to transactional. Firebase cannot add custom headers, so SMTPfast takes the category from the key: transactional email has no unsubscribe header and still reaches recipients who unsubscribed from marketing email. Keys are marketing by default; choose Transactional when you create the key, or under API Keys, Edit.

Ready to get started?

Start sending transactional email today. Free to start, no credit card required.

Start free