Set Up Emailing

Configure your Spiderly app to send emails such as verification codes, unhandled exception alerts, and notifications.

Configure Email Settings

Locate the Backend\YourAppName.WebAPI\appsettings.json file and set the following fields under AppSettings.Spiderly.Shared:

  • "EmailSender" — the existing email address to send from (verification codes, exception alerts, notifications), as an { "email": "...", "name": "..." } object (name is the optional display name).
  • "EmailSenderPassword"not your regular Gmail password. For Gmail this must be a Gmail App Password (see steps below).
  • "EmailReplyTo" — optional { "email": "...", "name": "..." } Reply-To address attached to emails sent with the default EmailSender. Useful when the sender is a no-reply address: replies land in a monitored inbox instead of bouncing.

SmtpHost defaults to smtp.gmail.com and SmtpPort defaults to 587, so for Gmail you only need to set EmailSender and EmailSenderPassword.

Generate a Gmail App Password

App Passwords are 16-character codes that let an app sign in to your Google Account without your regular password. Two-Step Verification must be enabled first.

  1. Open myaccount.google.com/security while signed in to the Google account you want to send from.
  2. Under How you sign in to Google, enable 2-Step Verification if it isn't already on.
  3. Open myaccount.google.com/apppasswords (or search "App passwords" from the security page).
  4. Enter an app name (e.g. Spiderly) and click Create.
  5. Copy the 16-character code shown in the yellow box — spaces are decorative, the code itself has no spaces. This is your EmailSenderPassword.
  6. The code is shown only once. If you lose it, delete the entry and create a new one.

Video walkthrough

Using Brevo

Spiderly also ships with a built-in Brevo (formerly Sendinblue) transactional email provider. To use it instead of SMTP:

1. Set BrevoApiKey in appsettings

Add your Brevo API key to the Spiderly.Shared section of appsettings.Development.local.json for local development (or environment variables in production):

"Spiderly.Shared": {
  "EmailSender": {
    "email": "no-reply@example.com",
    "name": "Example Shop"
  },
  "EmailReplyTo": {
    "email": "info@example.com",
    "name": "Example Shop"
  },
  "BrevoApiKey": "xkeysib-..."
}

EmailReplyTo is optional — leave it out to send without a Reply-To header.

2. Register the Brevo emailing implementation

On the AddSpiderly builder in your Startup.ConfigureServices, call:

spiderly.AddBrevoEmailing();

This registers BrevoEmailingService as the IEmailingService implementation and configures the named Brevo HttpClient with the API key from settings.

That's it — all emails (verification, exception alerts, background jobs) will now be sent through the Brevo API.