ozgur-soft / Smtp.NET

Simple library for sending utf-8 e-mails via smtp with .NET

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Smtp.NET

Simple library for sending utf-8 e-mails via smtp with .NET

Installation

dotnet add package Smtp --version 1.1.0

Usage

using System.Net.Mail;

namespace Smtp {
    internal class Program {
        static void Main(string[] args) {
            var smtp = new Smtp();
            smtp.SetHost("smtp host");
            smtp.SetPort(587);
            smtp.SetUsername("smtp username");
            smtp.SetPassword("smtp password");
            smtp.Mail(
                new MailAddress("sender mail address", "sender display name"),
                new MailAddress("recipient mail address", "recipient display name"),
                "mail subject",
                "mail content"
            );
        }
    }
}

About

Simple library for sending utf-8 e-mails via smtp with .NET

License:MIT License


Languages

Language:C# 100.0%