30% OFF - Use code HANDSON30 for 30% off any course or Dometrain Pro! Browse courses →
  • Courses
  • Learning Paths
  • Blogs
  • Authors
  • Leaderboard
  • Dometrain Pro
  • Shopping Basket

    Your basket is empty

  • Business Portal
  • From Zero to Hero: Sending Email with .NET

    Learn everything you need to know to send production-grade emails in .NET

    About This Course

    The world runs on email. Book a train ticket? Get an email. Buy something online? Get an order confirmation email. Forgotten your password? No problem - we�ll send you an email. But for developers, working with email can be a chaotic mix of incompatible clients, devices and standards. Dylan Beattie has been building applications that send mail since the 1990s; software that he�s designed and built has sent over a billion emails. In this course, Dylan will teach you everything you need to know to build, send and test email applications using .NET - from the underlying standards that control how internet email works, to libraries and packages like MailKit and MJML, to the architectural patterns you can use to send thousands of emails without slowing down the rest of your system.

    Course Curriculum

    9h 42m 8 sections
    Welcome
    01:20 Free preview
    What will you learn in this course?
    02:09 Free preview
    Who is the course for and prerequisites
    01:47 Free preview
    SmtpClient, MailKit and MimeKit
    05:16
    What's an SMTP Server - and why do we need one
    03:00
    Exploring SMTP with MailPit and telnet
    05:57
    Sending Mail with MailKit and MailPit
    03:16
    Multipart Messages with MimeKit BodyBuilder
    01:47
    Attachments and Inline Images
    04:02
    Introduction
    01:03
    Scenario and Data Model
    01:30
    Building Emails with StringBuilder
    20:51
    StringBuilding HTML and Field Replacement
    04:17
    Templating Engines Overview
    05:34
    Comparing Razor Engines
    11:08
    Razor.Templating.Core - Implementing IFileInfo and IFileProvider
    15:27
    Templating HTML with Fluid
    24:10
    Templating HTML with RazorEngine-NetCore
    10:09
    Templating HTML with Razor Components
    18:01
    Sending Test Mail with Mailpit
    07:49
    Introducing Mailtrap
    10:02
    HTML Email - What's The Problem
    04:08
    Introducing MJML
    15:20
    Running MJML with .NET
    21:18
    Templating with MJML
    23:49
    Introducing Rockaway
    06:58
    Rendering Real World Emails
    19:18
    Dynamic PDFs with QuestPDF
    23:39
    Creating Data-Driven PDFs
    15:57
    Sending Real Emails with MailKit
    26:59
    Testing Email Services - Overview
    06:19
    Testing Email Services - Deep Dive
    41:33
    Review and Recap
    01:13
    Email Delivery Considerations
    01:32
    Email Address Validation
    03:38
    Choosing an SMTP Server
    05:04
    Email Domain Validation
    04:20
    DNS for Email - SPF, DKIM and DMARC
    18:32
    Sending Our First REAL Email
    09:09
    Sending Mail Asynchronously with Channels and BackgroundServices
    25:40
    Reusing the SMTP Connection
    23:17
    Parallel Sending with BackgroundServices and SignalR
    58:15
    Distributed Email with EasyNetQ - Overview and Architecture
    06:00
    Distributed Email with EasyNetQ - Preparation and Refactoring
    10:47
    Distributed Email with EasyNetQ - Implementation
    40:56
    Conclusion
    08:47

    Meet Your Instructor

    Dylan Beattie

    Dylan Beattie

    Dylan Beattie is a consultant, software developer and international keynote speaker. He’s been building data-driven web applications since the 1990s; he’s managed teams, taught workshops, and worked on everything from tiny standalone websites to complex distributed systems. He’s a Microsoft MVP, and he regularly speaks at conferences and user groups all over the world.

    Dylan is the creator of the Rockstar programming language, the director of Ursatile, and the founder of The Linebreakers, the world’s greatest tech comedy party rock band. He’s online at dylanbeattie.net and on Bluesky as @dylanbeatt.ie.

    View all courses by Dylan Beattie

    What's New

    Getting Started: Model Context Protocol (MCP)
    course

    Getting Started: Model Context Protocol (MCP)

    Learn how to get started with the Model Context Protocol (MCP) and integrate it into your applications.

    Learn more about Getting Started: Model Context Protocol (MCP)
    Hands-On: Learn TypeScript
    course

    Hands-On: Learn TypeScript

    Learn TypeScript through hands-on coding exercises. Practice what you learn with interactive challenges designed for every level.

    Learn more about Hands-On: Learn TypeScript
    Hands-On: Learn JavaScript
    course

    Hands-On: Learn JavaScript

    Learn JavaScript through hands-on coding exercises. Practice what you learn with interactive challenges designed for every level.

    Learn more about Hands-On: Learn JavaScript
    Hands-On: Data Structures & Algorithms in C#
    course

    Hands-On: Data Structures & Algorithms in C#

    Master data structures and algorithms through hands-on coding exercises in C#. Free to enroll for 7 days!

    Learn more about Hands-On: Data Structures & Algorithms in C#
    Blogsmith.ai
    feature

    Blogsmith.ai

    Turn your videos into blogs and newsletters with AI. Check out our new product at blogsmith.ai.

    Learn more about Blogsmith.ai
    Leaderboard
    feature

    Leaderboard

    See how you stack up against other learners. Track your progress, climb the ranks, and compete with the Dometrain community.

    Learn more about Leaderboard
    Hands-On: Learn PostgreSQL
    course

    Hands-On: Learn PostgreSQL

    Learn PostgreSQL through hands-on coding exercises. Practice what you learn with interactive challenges designed for every level.

    Learn more about Hands-On: Learn PostgreSQL
    Free Hands-On: C# for Beginners
    course

    Free Hands-On: C# for Beginners

    Learn C# through hands-on coding exercises. Practice what you learn with interactive challenges designed for everyone, from beginners to experts.

    Learn more about Free Hands-On: C# for Beginners
    Getting Started: AI for .NET Developers
    course

    Getting Started: AI for .NET Developers

    Get started with integrating AI into your .NET applications effectively using the latest LLM best practices.

    Learn more about Getting Started: AI for .NET Developers
    Getting Started: Building .NET Applications on AWS
    course

    Getting Started: Building .NET Applications on AWS

    Learn how to build and deploy .NET applications on AWS using CDK, Lambda, DynamoDB, S3, and more.

    Learn more about Getting Started: Building .NET Applications on AWS
    What's new in C# 14
    blog

    What's new in C# 14

    This guide covers every new C# 14 feature, explains its benefits, and provides practical code examples to help you navigate how you can use them.

    Learn more about What's new in C# 14
    Let's Build It: AI Chatbot with RAG in .NET Using Your Data
    course

    Let's Build It: AI Chatbot with RAG in .NET Using Your Data

    Build a Retrieval-Augmented Generation (RAG) chatbot that can answer questions using your data.

    Learn more about Let's Build It: AI Chatbot with RAG in .NET Using Your Data
    From Zero to Hero: SignalR in .NET
    course

    From Zero to Hero: SignalR in .NET

    Enable enterprise-grade real-time communication for your web apps with SignalR.

    Learn more about From Zero to Hero: SignalR in .NET
    Deep Dive: Solution Architecture
    course

    Deep Dive: Solution Architecture

    Master solution architecture and turn business needs into scalable, maintainable systems.

    Learn more about Deep Dive: Solution Architecture
    Migrating: ASP.NET Web APIs to ASP.NET Core
    course

    Migrating: ASP.NET Web APIs to ASP.NET Core

    A step-by-step process to migrate ASP.NET Web APIs from .NET Framework to ASP.NET Core.

    Learn more about Migrating: ASP.NET Web APIs to ASP.NET Core
    Getting Started: Caching in .NET
    course

    Getting Started: Caching in .NET

    Let's make the hardest thing in programming easy for .NET software engineers.

    Learn more about Getting Started: Caching in .NET
    From Zero to Hero: Testing with xUnit in C#
    course

    From Zero to Hero: Testing with xUnit in C#

    Learn how to test any codebase in .NET with the latest version of xUnit, the industry-standard testing library.

    Learn more about From Zero to Hero: Testing with xUnit in C#
    Create a ChatGPT Console AI Chatbot in C#
    blog

    Create a ChatGPT Console AI Chatbot in C#

    This walkthrough is your hands-on entry point to create a basic C# console application that talks to ChatGPT using the OpenAI API.

    Learn more about Create a ChatGPT Console AI Chatbot in C#