Jmcarrasc0.Mail.Sending 2023.3.3.2

dotnet add package Jmcarrasc0.Mail.Sending --version 2023.3.3.2                
NuGet\Install-Package Jmcarrasc0.Mail.Sending -Version 2023.3.3.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Jmcarrasc0.Mail.Sending" Version="2023.3.3.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Jmcarrasc0.Mail.Sending --version 2023.3.3.2                
#r "nuget: Jmcarrasc0.Mail.Sending, 2023.3.3.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Jmcarrasc0.Mail.Sending as a Cake Addin
#addin nuget:?package=Jmcarrasc0.Mail.Sending&version=2023.3.3.2

// Install Jmcarrasc0.Mail.Sending as a Cake Tool
#tool nuget:?package=Jmcarrasc0.Mail.Sending&version=2023.3.3.2                

Jmcarrasc0 - Mail.Sending

<a href="https://www.patreon.com/join/jmcarrasc0?"><img src="https://i.postimg.cc/pLVXsBVs/jmcarrasc0-new.png" alt="jmcarrasco logo" ></a>

Mail.Sending is a nuget package based on .NET for sending mail through an Smtp server with the SMTP Relay function or with user and password authentication..

Quick install

Mail.Sending is constantly in development! Try it out now:

NuGet

PM> Install-Package Jmcarrasc0.Mail.Sending -Version 2023.3.3.1

or

.NET CLI

> dotnet add package Jmcarrasc0.Mail.Sending --version 2023.3.3.1

PackageReference

<PackageReference Include="Jmcarrasc0.Mail.Sending" Version="2023.3.3.1" />

Paket CLI

> paket add Jmcarrasc0.Mail.Sending --version 2023.3.3.1

Script & Interactive

> #r "nuget: Jmcarrasc0.Mail.Sending, 2023.3.3.1"

Cake

// Install Jmcarrasc0.Mail.Sending as a Cake Addin
#addin nuget:?package=Jmcarrasc0.Mail.Sending&version=2023.3.3.1

// Install Jmcarrasc0.Mail.Sending as a Cake Tool
#tool nuget:?package=Jmcarrasc0.Mail.Sending&version=2023.3.3.1

<br> <br>

How to use it

It is very easy to implement

C#


using Jmcarrasc0.Mail.Sending;

var mail = new Mail();

    var email = new Email()
    {
        Account = "Account or user",
        Password = "Password",
        MailServer = "Server",
        IsSSL = "true or false",
        Port = "Default communication port 25",
        Addressees = new List<Addressee>() {
            new Addressee {
                ShowName = "ShowName",
                Mail = "correo@demo.com",
            }
        },
        AddresseesCC = new List<Addressee>() {
            new Addressee {
                ShowName = "ShowName",
                Mail = "correo@demo.com",
            }
        },
        AddresseesBCC = new List<Addressee>() {
            new Addressee {
                ShowName = "ShowName",
                Mail = "correo@demo.com",
            }
        },
        BodyIsHtml = "true or false",
        Body = "Read your HTML structure",
        ScreenName = "Name to Display",
        Title = "Title",
        Attachments = new List<Attached>() {
            new Attachments {
                file="Binary file",
                name="Name",
                MediaType="Media type" 
            }
        }
        
    };

    _ = mail.SendMail(email);


/// <summary>
/// Function for sending e-mails through SMTP Relay
/// </summary>


var mail = new Mail();

    var email = new EmailHost()
    {
        Host = "Server",
        IsSSL = "true or false",
        From= "From Email",
        Port = "Default communication port 25",
        Addressees = new List<Addressee>() {
            new Addressee {
                ShowName = "ShowName",
                Mail = "correo@demo.com",
            }
        },
        AddresseesCC = new List<Receiver>() {
            new Addressee {
                ShowName = "ShowName",
                Mail = "correo@demo.com",
            }
        },
        AddresseesBCC = new List<Addressee>() {
            new Addressee {
                ShowName = "ShowName",
                Mail = "correo@demo.com",
            }
        },
        BodyIsHtml = "true or false",
        Body = "Read your HTML structure",
        ScreenName = "Name to Display",
        Title = "Title",
        Attachments = new List<Attached>() {
            new Attachments {
                file="Binary file",
                name="Name",
                MediaType="Media type" 
            }
        }
        
    };

   _ = mail.SendMailbyHost(email);



<br> <br>

VB.NET


Imports Jmcarrasc0.Mail.Sending

        Dim mail = New Mail()
        Dim email = New Email() With {
            .Account = "Account or user",
            .Password = "Password",
            .MailServer = "Server",
            .IsSSL = "true or false",
            .Port = "Default communication port 25",
            .Recipients = New Recipient List(From Recipients)() From {
                New Recipient() With {
                    .ShowName = "Show Name",
                    .Mail = "correo@demo.com"
                }
            },
            .AddresseesCC = New List(Of Addressee)() From {
                New Addressee() With {
                    .ShowName = "ShowName",
                    .Mail = "correo@demo.com"
                }
            },
            .AddresseesBCC = New List(Of Addressee)() From {
                New Addressee() With {
                    .ShowName = "ShowName",
                    .Mail = "correo@demo.com"
                }
            },
            .BodyIsHtml = "true or false",
            .Body = "Read your HTML structure",
            .ScreenName = "Name to Display",
            .Title = "Title",
            .Attachments = New List(Of Attached)() From {
                New Attachment() With {
                    .file = "Binary File",
                    .name = "Name",
                    .MediaType = "Media Type"
                }
            }
        }
        Dim result = mail.SendMail(email)


'Function for sending e-mails through SMTP Relay'


        Dim mail = New Mail()
        Dim email = New EmailHost() With {
            .Host = "Server",
            .IsSSL = "true or false",
            .Port = "Default communication port 25",
            .Recipients = New Recipient List(From Recipients)() From {
                New Recipient() With {
                    .ShowName = "Show Name",
                    .Mail = "correo@demo.com"
                }
            },
            .AddresseesCC = New List(Of Addressee)() From {
                New Addressee() With {
                    .ShowName = "ShowName",
                    .Mail = "correo@demo.com"
                }
            },
            .AddresseesBCC = New List(Of Addressee)() From {
                New Addressee() With {
                    .ShowName = "ShowName",
                    .Mail = "correo@demo.com"
                }
            },
            .BodyIsHtml = "true or false",
            .Body = "Read your HTML structure",
            .ScreenName = "Name to Display",
            .Title = "Title",
            .Attachments = New List(Of Attached)() From {
                New Attachment() With {
                    .file = "Binary File",
                    .name = "Name",
                    .MediaType = "Media Type"
                }
            }
        }
        Dim result = mail.SendMailbyHost(email)
        

<br> <br>

Compatibily Support

Mail.Sending is a nuget package compatible with the following Frameworks

  • .NET 7
  • .NET 6
  • .NET 5

<br> <br>

Code copyright 2023 Juan Carrasco. Code released under the MIT license.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2023.3.3.2 201 8/16/2023
2.0.1 173 8/12/2023
1.1.1 482 4/6/2022
1.1.0 442 3/23/2022
1.0.2 412 3/22/2022
1.0.1 413 3/22/2022
1.0.0 403 3/21/2022

Nueva version basada en Mailkit para el envio de las mas recientes tecnologias mediante smtp relay
Se aplica la nueva nomeclatura de versionamiento
Año | Trimestre | Mayor | Parche