NeedFulThings.Email
0.1.55
dotnet add package NeedFulThings.Email --version 0.1.55
NuGet\Install-Package NeedFulThings.Email -Version 0.1.55
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="NeedFulThings.Email" Version="0.1.55" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NeedFulThings.Email" Version="0.1.55" />
<PackageReference Include="NeedFulThings.Email" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NeedFulThings.Email --version 0.1.55
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NeedFulThings.Email, 0.1.55"
#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.
#:package NeedFulThings.Email@0.1.55
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NeedFulThings.Email&version=0.1.55
#tool nuget:?package=NeedFulThings.Email&version=0.1.55
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Creating a Email object instance with validation
//Create a email object from a string
//If the string is not a valid email a exception is thrown.
var email = new Email("info@somedomain.com");
//Create a Email object from a string
//If the string is not a valid Email a exception is thrown.
Email email = "info@somedomain.com";
//To get the email as string make a call to ToString();
var str = email.ToString();
//Try parsing a email string to a Email object
if(Email.TryParse("info@somedomain.com", out Email result))
{
// Use the result
}
The Email object properties:
Local : The first part of the email before @ char
SLD: The second layer domain every thin from '@' to the last '.'
TLD: The top level domain like com, gov.
It differ in what mail servers accept as valid emails this Email validates using this rules:
- It must start with a character (alphabets a-z, A-Z).
- It can include** alphanumeric characters** (a-z, A-Z, 0-9), periods (.), underscores (_), hyphens (-), percent signs (%), and** plus signs** (+).
- The**@ symbol** is used to separate the local part from the domain part.
- The** domain part (TLD)** must contain at least one dot (.) and it cannot start or end with a dot(.).
- The** domain part (TLD)** must not have two or more dots(.) consecutively.
- The** last part of the domain (SLD)** (after the last dot) must be at least two characters long, typically a country code(2-3 letters) or a known domain(.com, .net, .org, etc).
<a id="fakes"></a>
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- No dependencies.
NuGet packages (3)
Showing the top 3 NuGet packages that depend on NeedFulThings.Email:
| Package | Downloads |
|---|---|
|
NeedfulThings.Plethora
Collection of helpers and extensions |
|
|
NeedfulThings.Attributes
Package Description |
|
|
NeedFulThings.Fakes
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.