https://github.com/cofoundry-cms/cofoundry.plugins.mail.mailkit
Cofoundry mail services that utilize the cross platform MailKit library.
https://github.com/cofoundry-cms/cofoundry.plugins.mail.mailkit
Last synced: 9 months ago
JSON representation
Cofoundry mail services that utilize the cross platform MailKit library.
- Host: GitHub
- URL: https://github.com/cofoundry-cms/cofoundry.plugins.mail.mailkit
- Owner: cofoundry-cms
- License: mit
- Created: 2017-07-24T11:33:08.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2025-01-04T10:39:52.000Z (over 1 year ago)
- Last Synced: 2025-09-17T04:11:14.050Z (9 months ago)
- Language: C#
- Homepage:
- Size: 49.8 KB
- Stars: 0
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cofoundry.Plugins.Mail.MailKit
[](https://ci.appveyor.com/project/Cofoundry/cofoundry-plugins-mail-mailkit)
[](https://www.nuget.org/packages/Cofoundry.Plugins.Mail.MailKit/)
This library is a plugin for [Cofoundry](https://www.cofoundry.org). For more information on getting started with Cofoundry check out the [Cofoundry repository](https://github.com/cofoundry-cms/cofoundry).
## Overview
This library allows you to send mail using the cross platform [MailKit](https://github.com/jstedfast/MailKit) library. By referencing this package your Cofoundry project will automatically replace the default `IMailDispatchService` implementation with one that uses MailKit. Use the following settings to configure the service:
- ***Cofoundry:Plugins:MailKit:Host*** Host address of the smtp server to connect with. Defaults to localhost.
- ***Cofoundry:Plugins:MailKit:Port*** The port to connect to the smtp server on. Defaults to 25.
- ***Cofoundry:Plugins:MailKit:EnableSsl*** Indicates whether ssl should be used to connect to the host.
- ***Cofoundry:Plugins:MailKit:UserName*** The user name to authenticate with the smtp server. If left empty then no auth will be used.
- ***Cofoundry:Plugins:MailKit:Password*** The password use when authenticating with the smtp server.
- ***Cofoundry:Plugins:MailKit:CertificateValidationMode*** Used to configure how the ssl certificate is validated. `Default` uses the default MailKit validator, which allows valid certificates and self-signed certificates with an untrusted root. `All` ignores all certificate errors. `ValidOnly` allows only valid certificates without errors.
- ***Cofoundry:Plugins:MailKit:Disabled*** Indicates whether the plugin should be disabled, which means services will not be bootstrapped. Defaults to false.
## Custom Connection Configuration
For more control over how MailKit initializes and connects to the SMTP host you can implement your own `ISmtpClientConnectionConfiguration` and override the default implementation using the [Cofoundry DI system](https://www.cofoundry.org/docs/framework/dependency-injection).