Skip to content

Mail Smtp

Arsenty Politov edited this page Mar 15, 2019 · 1 revision

DevGuild.AspNetCore.Services.Mail.Smtp

Provides implementation for SMTP email provider that uses external SMTP server to send email messages.

Adding provider

To add SMTP email provider add following chained call after AddMail:

.AddSmtp()

Configuration

The SMTP email provider has the following options:

  • Host - Host name of SMTP server.
  • Port - Port that should be used to connect to SMTP server.
  • UseSsl - true if SSL-wrapped connection should be established to the server; otherwise, false
  • UserName - user name that should be used for authentication.
  • Password - password that should be used for authentication.

Example:

"Mail": {
    "System": {
        "Type": "Smtp",
        "Sender": "[email protected]",
        "Options": {
            "Host": "smtp.example.com",
            "Port": 465,
            "UseSsl": true,
            "UserName": "sender",
            "Password": "P@ssw0rd"
        }
    }
}

Clone this wiki locally