Class SmtpService
- Namespace
- FishMMO.Server.Implementation.Smtp
- Assembly
- FishMMO.Server.dll
SMTP email sender using System.Net.Mail. Reads SMTP settings from server configuration, with environment variable overrides for container/ orchestration deployments (FISHMMO_SMTP_HOST, FISHMMO_SMTP_PORT, etc.).
public class SmtpService : ISmtpService
- Inheritance
-
SmtpService
- Implements
- Inherited Members
Constructors
SmtpService(IServerConfiguration)
Initializes a new instance of the SmtpService class. Reads SMTP settings from server configuration with environment variable overrides.
public SmtpService(IServerConfiguration configuration)
Parameters
configurationIServerConfigurationThe server configuration instance.
Methods
SendEmailAsync(string, string, string)
Sends an email asynchronously.
public Task<bool> SendEmailAsync(string to, string subject, string body)
Parameters
tostringRecipient email address.
subjectstringEmail subject line.
bodystringEmail body (HTML or plain-text).