Set Up Emailing
Configure your Spiderly app to send emails such as verification codes, unhandled exception alerts, and notifications.
Prefer Watching Instead?
Configure Email Settings
Locate the Backend\YourAppName.WebAPI\appsettings.json file and set the following fields:
"EmailSender"- Set this to the existing email address you want to use for sending various types of emails, such as verification codes, unhandled exception alerts, and notifications."EmailSenderPassword"- Do not use your regular Gmail password. This must be the Gmail App Password for the same email account specified in"EmailSender". Follow the video tutorial to see how to generate an Gmail App Password from your Google account.
Note:
SmtpHost defaults to smtp.gmail.com and SmtpPort defaults to 587, so for Gmail you only need to set EmailSender and EmailSenderPassword.
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": "you@example.com",
"BrevoApiKey": "xkeysib-..."
}2. Register the Brevo HttpClient
In your Startup.ConfigureServices (or Program.cs), call:
services.SpiderlyAddBrevoEmailingService();3. Register BrevoEmailingService in DI
Wire up IEmailingService to the Brevo implementation:
registry.Register<IEmailingService, Spiderly.Shared.Emailing.BrevoEmailingService>();That's it — all emails (verification, exception alerts, background jobs) will now be sent through the Brevo API.