Jmcarrasc0.Mail.Sending
1.1.1
See the version list below for details.
dotnet add package Jmcarrasc0.Mail.Sending --version 1.1.1
NuGet\Install-Package Jmcarrasc0.Mail.Sending -Version 1.1.1
<PackageReference Include="Jmcarrasc0.Mail.Sending" Version="1.1.1" />
paket add Jmcarrasc0.Mail.Sending --version 1.1.1
#r "nuget: Jmcarrasc0.Mail.Sending, 1.1.1"
// Install Jmcarrasc0.Mail.Sending as a Cake Addin #addin nuget:?package=Jmcarrasc0.Mail.Sending&version=1.1.1 // Install Jmcarrasc0.Mail.Sending as a Cake Tool #tool nuget:?package=Jmcarrasc0.Mail.Sending&version=1.1.1
Jmcarrasc0 - Mail.Sending
<a href="https://www.patreon.com/join/jmcarrasc0?"><img src="https://i.postimg.cc/hPcgmRWQ/jmcarrasc0-logo.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 1.1.1
or
.NET CLI
> dotnet add package Jmcarrasc0.Mail.Sending --version 1.1.1
PackageReference
<PackageReference Include="Jmcarrasc0.Mail.Sending" Version="1.1.1" />
Paket CLI
> paket add Jmcarrasc0.Mail.Sending --version 1.1.1
Script & Interactive
> #r "nuget: Jmcarrasc0.Mail.Sending, 1.1.1"
Cake
// Install Jmcarrasc0.Mail.Sending as a Cake Addin
#addin nuget:?package=Jmcarrasc0.Mail.Sending&version=1.1.1
// Install Jmcarrasc0.Mail.Sending as a Cake Tool
#tool nuget:?package=Jmcarrasc0.Mail.Sending&version=1.1.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 6
- .NET 5
- .NET Core 3.1
<br> <br>
Copyright and license
Code copyright 2022 Juan Carrasco. Code released under the MIT license.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. 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. |
-
net6.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Minor operational improvements