Mail.dll
3.0.24303.1333
dotnet add package Mail.dll --version 3.0.24303.1333
NuGet\Install-Package Mail.dll -Version 3.0.24303.1333
<PackageReference Include="Mail.dll" Version="3.0.24303.1333" />
paket add Mail.dll --version 3.0.24303.1333
#r "nuget: Mail.dll, 3.0.24303.1333"
// Install Mail.dll as a Cake Addin #addin nuget:?package=Mail.dll&version=3.0.24303.1333 // Install Mail.dll as a Cake Tool #tool nuget:?package=Mail.dll&version=3.0.24303.1333
Mail.dll
Mail.dll is a .NET IMAP component, POP3 component and SMTP component library.
Includes an email and MIME parser. Allows sending, receiving and processing email messages in .NET applications. Includes SSL and TLS support along with OAuth and DKIM capabilities. Includes secure MIME (S/MIME) parser for processing encrypted and signed emails.
Contains iCal, vCard and Outlook's msg files parsers. Decodes winmail.dat attachments.
Getting started with Mail.dll
Download emails using IMAP
using(Imap imap = new Imap())
{
imap.ConnectSSL("imap.server.com"); // or Connect for non SSL/TLS
imap.UseBestLogin("user", "password");
imap.SelectInbox();
List<long> uids = imap.Search(Flag.Unseen);
foreach (long uid in uids)
{
var eml = imap.GetMessageByUID(uid);
IMail email = new MailBuilder().CreateFromEml(eml);
string subject = email.Subject;
}
imap.Close();
}
Download emails using POP3
using(Pop3 pop3 = new Pop3())
{
pop3.ConnectSSL("pop3.server.com"); // or Connect for non SSL/TLS
pop3.UseBestLogin("user", "password");
List<string> uids = pop3.GetAll();
foreach (string uid in uids)
{
var eml = pop3.GetMessageByUID(uid);
IMail email = new MailBuilder().CreateFromEml(eml);
string subject = email.Subject;
}
pop3.Close();
}
Send emails using SMTP
MailBuilder builder = new MailBuilder();
builder.From.Add(new MailBox("from@example.com"));
builder.To.Add(new MailBox("to@example.com"));
builder.Subject = "Subject";
builder.Html = @"Html with an image: <img src=""cid:lena"" />";
var visual = builder.AddVisual(@"c:\lena.jpeg");
visual.ContentId = "lena";
var attachment = builder.AddAttachment(@"c:\tmp.doc");
attachment.SetFileName("document.doc", guessContentType: true);
IMail email = builder.Create();
using(Smtp smtp = new Smtp())
{
smtp.Connect("smtp.server.com"); // or ConnectSSL for SSL
smtp.UseBestLogin("user", "password");
smtp.SendMessage(email);
smtp.Close();
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. 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 is compatible. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net20 is compatible. net35 was computed. net40 was computed. net403 was computed. net45 is compatible. 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 is compatible. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 2.0
- No dependencies.
-
.NETFramework 3.5
- No dependencies.
-
.NETFramework 4.0
- No dependencies.
-
.NETFramework 4.5
- No dependencies.
-
.NETFramework 4.8
- No dependencies.
-
.NETStandard 2.0
- System.Security.Cryptography.Algorithms (>= 4.3.1)
- System.Security.Cryptography.Pkcs (>= 8.0.0)
- System.Security.Cryptography.X509Certificates (>= 4.3.2)
- System.Security.Cryptography.Xml (>= 8.0.1)
- System.Text.Encoding.CodePages (>= 8.0.0)
-
net5.0
- System.Security.Cryptography.Algorithms (>= 4.3.1)
- System.Security.Cryptography.Pkcs (>= 8.0.0)
- System.Security.Cryptography.X509Certificates (>= 4.3.2)
- System.Security.Cryptography.Xml (>= 8.0.1)
- System.Text.Encoding.CodePages (>= 6.0.0)
-
net6.0
- System.Security.Cryptography.Algorithms (>= 4.3.1)
- System.Security.Cryptography.Pkcs (>= 8.0.0)
- System.Security.Cryptography.X509Certificates (>= 4.3.2)
- System.Security.Cryptography.Xml (>= 8.0.1)
- System.Text.Encoding.CodePages (>= 8.0.0)
-
net8.0
- System.Security.Cryptography.Algorithms (>= 4.3.1)
- System.Security.Cryptography.Pkcs (>= 8.0.0)
- System.Security.Cryptography.X509Certificates (>= 4.3.2)
- System.Security.Cryptography.Xml (>= 8.0.1)
- System.Text.Encoding.CodePages (>= 8.0.0)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Mail.dll:
Package | Downloads |
---|---|
OElite.Web
OElite Web API SDK for OElite Platform based application development |
|
Soneta.CRM
Składnik programu Soneta. Program obsługi firmy: kadry-płace, księgowość, handel, magazyn, CRM, BI ... |
|
MepApps.Svr.Ctl
Mep Apps Inc. Server Controls |
|
MepApps.Svr.Internal
Mep Apps Inc. Cloud Internals |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
3.0.24303.1333 | 1,267 | 10/29/2024 | |
3.0.24129.1605 | 36,306 | 5/8/2024 | |
3.0.24030.1216 | 161,862 | 1/30/2024 | |
3.0.23283.1813 | 18,083 | 10/10/2023 | |
3.0.23156.1704 | 31,941 | 6/5/2023 | |
3.0.23025.1850 | 203,989 | 1/25/2023 | |
3.0.23002.841 | 2,308 | 1/2/2023 | |
3.0.22293.1001 | 87,732 | 10/20/2022 | |
3.0.22269.1117 | 5,509 | 9/26/2022 | |
3.0.22234.1038 | 44,650 | 8/22/2022 | |
3.0.22105.1207 | 38,694 | 4/15/2022 | |
3.0.22035.1741 | 38,938 | 2/4/2022 |