MrGeek.Net
1.4.113
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package MrGeek.Net --version 1.4.113
NuGet\Install-Package MrGeek.Net -Version 1.4.113
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="MrGeek.Net" Version="1.4.113" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MrGeek.Net --version 1.4.113
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MrGeek.Net, 1.4.113"
#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 MrGeek.Net as a Cake Addin
#addin nuget:?package=MrGeek.Net&version=1.4.113
// Install MrGeek.Net as a Cake Tool
#tool nuget:?package=MrGeek.Net&version=1.4.113
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MrGeek.Net
Send emails very easily using STMP clients.
Fixes
- Fix the issue with the From an email address not being set.
Changes
- Namespace = MrGeek.Net.Smtp
- MrGeek.Net.Smtp.EmailSenderOptions
- Host = string
- Port = int
- UserName = string
- Password = string
- SecureSocketOptions = SecureSocketOptions.StartTls
- From = string
- DisplayName = string
How to use
Program.cs
builder.Services.UseMailService(builder.Configuration);
ServiceExtension.cs
using MrGeek.Net.Smtp;
public static void UseMailService(this IServiceCollection services, IConfiguration config)
{
services.Configure<EmailSenderOptions>(config.GetSection("MailSettings");
services.AddScoped<IEmailSender, EmailSender>();
}
appsetting.json
{
"MailSettings": {
"DisplayName": "",
"From": "",
"Host": "",
"Port": "",
"UserName": "",
"Password": ""
}
}
Controller or Class file Example
private readonly IEmailSender _emailSender;
public Constructor(IEmailSender emailSender)
{
_emailSender = emailSender;
}
public async void SendEmail()
{
var message = new Message( to: "johndoe@example.com", subject: "Email Subject", content: "Email Body");
await _emailSender.SendEmailAsync(message);
}
This is an Internal Library used by Mr. Geek Philippines, Inc.
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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Ardalis.GuardClauses (>= 4.0.1)
- MailKit (>= 3.5.0)
- Microsoft.Extensions.Options (>= 7.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.