Mail.dll
3.0.23025.1850
dotnet add package Mail.dll --version 3.0.23025.1850
NuGet\Install-Package Mail.dll -Version 3.0.23025.1850
<PackageReference Include="Mail.dll" Version="3.0.23025.1850" />
paket add Mail.dll --version 3.0.23025.1850
#r "nuget: Mail.dll, 3.0.23025.1850"
// Install Mail.dll as a Cake Addin
#addin nuget:?package=Mail.dll&version=3.0.23025.1850
// Install Mail.dll as a Cake Tool
#tool nuget:?package=Mail.dll&version=3.0.23025.1850
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 |
---|---|
.NET | net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows |
.NET Core | netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1 |
.NET Standard | netstandard2.0 netstandard2.1 |
.NET Framework | net20 net35 net40 net403 net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48 net481 |
MonoAndroid | monoandroid |
MonoMac | monomac |
MonoTouch | monotouch |
Tizen | tizen40 tizen60 |
Xamarin.iOS | xamarinios |
Xamarin.Mac | xamarinmac |
Xamarin.TVOS | xamarintvos |
Xamarin.WatchOS | xamarinwatchos |
-
.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 (>= 6.0.0)
- System.Security.Cryptography.X509Certificates (>= 4.3.2)
- System.Security.Cryptography.Xml (>= 6.0.0)
- System.Text.Encoding.CodePages (>= 6.0.0)
-
net5.0
- System.Security.Cryptography.Algorithms (>= 4.3.1)
- System.Security.Cryptography.Pkcs (>= 6.0.0)
- System.Security.Cryptography.X509Certificates (>= 4.3.2)
- System.Security.Cryptography.Xml (>= 6.0.0)
- System.Text.Encoding.CodePages (>= 6.0.0)
-
net6.0
- System.Security.Cryptography.Algorithms (>= 4.3.1)
- System.Security.Cryptography.Pkcs (>= 6.0.0)
- System.Security.Cryptography.X509Certificates (>= 4.3.2)
- System.Security.Cryptography.Xml (>= 6.0.0)
- System.Text.Encoding.CodePages (>= 6.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.23025.1850 | 3,657 | 1/25/2023 |
3.0.23002.841 | 924 | 1/2/2023 |
3.0.22293.1001 | 38,805 | 10/20/2022 |
3.0.22269.1117 | 2,005 | 9/26/2022 |
3.0.22234.1038 | 32,317 | 8/22/2022 |
3.0.22105.1207 | 20,548 | 4/15/2022 |
3.0.22035.1741 | 23,679 | 2/4/2022 |
3.0.21294.1630 | 152,353 | 10/21/2021 |
3.0.21267.1221 | 10,305 | 9/24/2021 |
3.0.21231.1234 | 34,763 | 8/19/2021 |
3.0.21189.1553 | 10,919 | 7/8/2021 |
3.0.21134.1059 | 30,669 | 5/14/2021 |