Email setup
Aisman uses a centralized email service to send transactional emails such as registration confirmations, password resets, and email-change verifications.
Email configuration in appsettings.json
Section titled “Email configuration in appsettings.json”The email settings live under the Email key in appsettings.json:
"Email": { "UseEmail": "SMTP", "TestMode": { "Active": true, "Email": "your-test@example.com" }, "SMTP": { "Host": "smtp.your-provider.com", "Port": 587, "Username": "your-username", "Password": "your-password", "FromAddress": "noreply@yourdomain.com", "FromName": "Aisman", "UseSsl": true }}Key settings
Section titled “Key settings”| Setting | Description |
|---|---|
UseEmail | Which email service to use. Currently only SMTP is supported. |
TestMode.Active | When true, all outgoing emails are redirected to TestMode.Email regardless of the original recipient. Useful for development and testing. |
TestMode.Email | The email address that receives all emails when test mode is active. |
SMTP.Host | Your SMTP server hostname. |
SMTP.Port | SMTP port (typically 587 for TLS or 465 for SSL). |
SMTP.Username | SMTP authentication username. |
SMTP.Password | SMTP authentication password. |
SMTP.FromAddress | The “From” address on outgoing emails. |
SMTP.FromName | The display name for the “From” address. |
SMTP.UseSsl | Whether to use SSL/TLS when connecting to the SMTP server. |
Which pages send emails
Section titled “Which pages send emails”The following account pages send real emails through the centralized service:
- Register: Sends a confirmation email after account creation.
- Check email: Resends the confirmation email on request.
- Forgot password: Sends a password reset email with a styled reset link.
- Settings (email change): Sends verification emails to both the old and new addresses.
Adding new email services
Section titled “Adding new email services”The Email configuration structure is designed to support additional services beyond SMTP. To add a new service (for example Mailgun), add a new key alongside SMTP and update UseEmail to point to it.