Email_dotNET 1.1.0

dotnet add package Email_dotNET --version 1.1.0                
NuGet\Install-Package Email_dotNET -Version 1.1.0                
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="Email_dotNET" Version="1.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Email_dotNET --version 1.1.0                
#r "nuget: Email_dotNET, 1.1.0"                
#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 Email_dotNET as a Cake Addin
#addin nuget:?package=Email_dotNET&version=1.1.0

// Install Email_dotNET as a Cake Tool
#tool nuget:?package=Email_dotNET&version=1.1.0                

class Program { static void Main(string[] args) { string host = "smtp.gmail.com"; int port = 25; string user = "user"; string pass = "password";

	// Create Object Instance
	EmailClient emailClient = new EmailClient(user, pass);

	var mailMessage = new MailMessage
	{
		From = new MailAddress(host),
		Subject = "subject",
		Body = "<h1>Hello</h1>",
		IsBodyHtml = true,
	};
	mailMessage.To.Add("to@gmail.com");

	Console.WriteLine("1) Send: " + emailClient.Send(mailMessage));

	Console.WriteLine("2) Send: " + emailClient.Send("from@gmail.com", "to@gmail.com", "Test", "Ciao Tester"));

	EmailClient emailClient2 = new EmailClient(host, port, "noreply@gmail.com", "gmail2020", false);
	Console.WriteLine("3) Send: " + emailClient2.Send("from@gmail.com", "to@gmail.com", "Test", "Hello", "", "", false));
}

private static void SendEmailWithAttachments()
{
	string host = "smtp.gmail.com";
	int port = 25;
	string user = "user";
	string pass = "password";

	// Create Object Instance
	EmailClient emailClient = new EmailClient(host, port, user, pass);

	var mailMessage = new MailMessage
	{
		From = new MailAddress(host),
		Subject = "subject",
		Body = "<h1>Hello</h1>",
		IsBodyHtml = true,
	};
	mailMessage.To.Add("to@gmail.com");

	var attachment = new Attachment("profile.jpg", MediaTypeNames.Image.Jpeg);
	mailMessage.Attachments.Add(attachment);

	Console.WriteLine("> Send: " + emailClient.Send(mailMessage));
}

}

Product Compatible and additional computed target framework versions.
.NET Framework net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has 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.

Version Downloads Last updated
1.1.0 654 10/5/2020
1.0.0 408 10/2/2020

Extensions on the Fetch .NetFramework.