/EmailDemo

Demo about dealing with email stuff in C#

Primary LanguageC#MIT LicenseMIT

Demo for Sending Email

This is a demo project for sending email through Gmail SMTP in C#.

Quick Start

Setting up your basic config in ./EmailSender/appsettings.json

{
  "AppSettings": {
    "Account": "sender@gmail.com",
    "Password": "your email password",
    "Receivers": [
      "receiver1@gmail.com",
      "receiver2@gmail.com"
    ],
    "Attachment": "attachment file path"
  }
}

Sending email

cd ./EmailSender
$ dotnet run
Hello, World!
Successfully sent the email from sender@gmail.com to receiver1@gmail.com
Successfully sent the email from sender@gmail.com to receiver2@gmail.com

References