Sending an order by email - Blazor Purchase Orders - Part 24

Опубликовано: 23 Февраль 2026
на канале: Christopher Bell
825
15

A C# project using Blazor to create a simple Purchase Order System, incorporating Syncfusion controls and using Dapper to link to a SQL database.

This video shows how to send an order by email using MailKit. After installing the NuGet package for MailKit a test page is created to test the system, hard-coding the user email credentials. Once we have established that we have MailKit functioning correctly we develop an Email service that reads the user credentials from appsettings.json and can be called from any page. Lastly we build the email service into the Purchase Orders page to send orders by email, incorporating the Syncfusion Toast control to notify the user of the success, or failure, of dispatching the email. The email body includes a link to a preview of the purchase order.

00:00 - Introduction
01:27 - Installing MailKit
02:08 - Creating a MailKit test page
08:12 - Adding an Email Service class
14:40 - Modifying the Purchase Orders List to send emails
23:40 - Adding a Syncfusion Toast control
27:40 - Testing the Email function

Syncfusion: https://www.syncfusion.com/products/c...
Blazorcode.uk: https://blazorcode.uk/purchaseorders/...
Code: https://blazorcode.uk/purchaseorders/...

I have shamelessly copied and adapted code from these resources:
https://jasonwatmore.com/post/2020/07...
https://blazor.syncfusion.com/documen...
https://icons.getbootstrap.com
https://www.syncfusion.com/succinctly...

.