Table of Contents

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

configuration IServerConfiguration

The server configuration instance.

Methods

SendEmailAsync(string, string, string)

Sends an email asynchronously.

public Task<bool> SendEmailAsync(string to, string subject, string body)

Parameters

to string

Recipient email address.

subject string

Email subject line.

body string

Email body (HTML or plain-text).

Returns

Task<bool>

True if the email was accepted for delivery.