Skip to main content
AutoSend x Neon
Managed Better Auth is Neon’s hosted version of Better Auth. It sends emails such as verification codes and password reset codes. By default, it sends them from a shared Neon address, which is rate-limited and meant for development. For production apps, you can configure it to send the same emails from your own domain through AutoSend SMTP.

Prerequisites

Verified Domain

Make sure you have a verified domain added in AutoSend to send emails from.

SMTP Key

Create a project-specific SMTP key from the SMTP tab in Project Settings.

Configuration

1

Open Email Provider Settings

  1. Go to the Neon Console
  2. Select your project
  3. Navigate to Settings → Better Auth
  4. Under Email provider, click Configure email provider
2

Select Custom SMTP Provider

In the Email provider dropdown, select Custom SMTP provider.
3

Enter SMTP Credentials

Fill in the following settings:
The SMTP password is not your API key. Create a project-specific SMTP key from the SMTP tab in Project Settings.
4

Save Settings

Click Save to apply your SMTP configuration.
5

Test the Configuration

Under Email provider, click Send test email.Check the recipient’s inbox to confirm the email arrived from your sender address. The email also appears on the AutoSend Email Activity page.
Each Neon branch has its own email provider settings, and a new branch copies the settings of its parent. Configure the provider on the branch your app uses.

Alternative: Neon CLI

You can also set the SMTP provider with the Neon CLI. From a directory linked to your project, run:
Then send a test email:

Email Templates

With SMTP, Managed Better Auth sends its own default email templates from your address. To design the emails in AutoSend instead, use Managed Better Auth webhooks: handle the send.otp and send.magic_link events and send each email with an AutoSend template.

Send emails with Neon

All the ways to use AutoSend with Neon, including webhooks and Neon Functions.

Troubleshooting

  • Verify your SMTP credentials are correct
  • Check that your sender email is on a domain verified in AutoSend
  • Make sure you configured the provider on the branch your app uses
While a Managed Better Auth webhook subscribes to send.otp or send.magic_link, Neon sends those emails to the webhook instead of through SMTP. Remove those events from the webhook to send them through AutoSend SMTP.
  • Ensure the username is autosend and the password is your SMTP key, not your API key
  • Verify your SMTP key is active in the SMTP Settings
  • Ensure your domain has proper DNS records (SPF, DKIM, DMARC)
  • Use a sender name your users recognize
  • Check your domain reputation in AutoSend