From d5475dce93c624db4c2770ea1a7dd83455c7da7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Tue, 18 Aug 2020 21:52:26 +0300 Subject: [PATCH] Finalize the emailing document --- docs/en/Emailing.md | 20 +++++++++++++++----- docs/en/MailKit.md | 3 +++ docs/en/docs-nav.json | 11 ++++++++++- 3 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 docs/en/MailKit.md diff --git a/docs/en/Emailing.md b/docs/en/Emailing.md index 2b1ae1b698..d0eee20bb1 100644 --- a/docs/en/Emailing.md +++ b/docs/en/Emailing.md @@ -5,7 +5,7 @@ ABP Framework provides various services, settings and integrations for sending e * Provides `IEmailSender` service that is used to send emails. * Defines [settings](Settings.md) to configure email sending. * Integrates to the [background job system](Background-Jobs.md) to send emails via background jobs. -* Provides [MailKit](https://github.com/jstedfast/MailKit) integration package. +* Provides [MailKit integration](MailKit.md) package. ## Installation @@ -219,10 +219,20 @@ See the [text templating system](Text-Templating.md) document for details. > Notice that you can define and use your own templates for your application, rather than using the standard simple templates. These standard templates are mostly for reusable modules where they don't define their own templates but rely on the built-in ones. This makes easy to customize emails sent by the used modules, by just overriding the standard email layout template. -## MailKit Integration +## NullEmailSender -TODO +`NullEmailSender` is a built-in class that implements the `IEmailSender`, but writes email contents to the [standard log system](Logging.md), rathen than actually sending the emails. -## NullEmailSender +This class can be useful especially in development time where you generally don't want to send real emails. The [application startup template](Startup-Templates/Application.md) already uses this class in the **DEBUG mode** with the following configuration in the domain layer: + +````csharp +#if DEBUG + context.Services.Replace(ServiceDescriptor.Singleton()); +#endif +```` + +So, don't confuse if you don't receive emails on DEBUG mode. Emails will be sent as expected on production (RELEASE mode). Remove these lines if you want to send real emails on DEBUG too. + +## See Also -TODO \ No newline at end of file +* [MailKit integration for sending emails](MailKit.md) \ No newline at end of file diff --git a/docs/en/MailKit.md b/docs/en/MailKit.md new file mode 100644 index 0000000000..e98a81454f --- /dev/null +++ b/docs/en/MailKit.md @@ -0,0 +1,3 @@ +# MailKit Integration + +TODO! \ No newline at end of file diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json index c2517a208d..5e0313bf1e 100644 --- a/docs/en/docs-nav.json +++ b/docs/en/docs-nav.json @@ -212,7 +212,16 @@ }, { "text": "Email Sending", - "path": "Emailing.md" + "items": [ + { + "text": "Email Sending System", + "path": "Emailing.md", + }, + { + "text": "MailKit Integration", + "path": "MailKit.md", + } + ] }, { "text": "BLOB Storing",