Email_dotNET 1.1.0

Install-Package Email_dotNET -Version 1.1.0
dotnet add package Email_dotNET --version 1.1.0
<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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Email_dotNET, 1.1.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. 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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

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));
}

}

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 296 10/5/2020
1.0.0 167 10/2/2020

Extensions on the Fetch .NetFramework.