Interface ISmtpSender
- Namespace
- FishMMO.ControlPanel.Services
- Assembly
- FishMMO-ControlPanel.dll
Delivers one message to the configured relay.
public interface ISmtpSender
Remarks
Separate from the queue on purpose: EmailQueueDrainService decides what to send and what to record afterwards, and this decides only how a message reaches a relay.
Properties
ConfigurationSummary
One line naming where mail goes, or why it goes nowhere. Safe to log: it never contains the username or the password.
string ConfigurationSummary { get; }
Property Value
IsConfigured
Whether this deployment has a relay worth talking to.
bool IsConfigured { get; }
Property Value
Remarks
False is a supported state, not a fault. A panel brought up for development, or one standing in front of a shard whose mail goes out elsewhere, has no relay and should not be spending a database round trip every couple of seconds claiming messages it cannot deliver.
Methods
SendAsync(string, string, string, CancellationToken)
Sends one message, returning whether the relay accepted it.
Task<bool> SendAsync(string to, string subject, string body, CancellationToken cancellationToken = default)
Parameters
tostringRecipient address.
subjectstringSubject line.
bodystringThe stored body, either plain text or HTML. Both parts are derived from it; see SmtpSender.
cancellationTokenCancellationTokenCancellation token.