Skip to content

Commit

Permalink
Bumped version to v5.8.1 (#27)
Browse files Browse the repository at this point in the history
Fixes
* Fixed: Large embedded images could throw `UriFormatException`
* Package references: Set version range of compatible dependencies for `MailKit`, `MimeKit`, `SmartFormat.NET`, `YAXLib`

Others
* Updates release notes
* Added Directory.Build.props and aligned project files
* Tests run on net6.0
* Added nuget package readme
* CI auto-deploy
  • Loading branch information
axunonb authored Jun 3, 2022
1 parent 41ca434 commit 2ce476e
Show file tree
Hide file tree
Showing 8 changed files with 136 additions and 70 deletions.
Binary file added MailMergeLlib_300x52.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions PkgReadMe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# ![MailMergeLib](https://raw.githubusercontent.com/axuno/MailMergeLib/main/MailMergeLlib_300x52.png)

### What is *MailMergeLib*?

```MailMergeLib``` version 5 is an SMTP mail client library which provides comfortable mail merge capabilities. ```MailMergeLib``` is written in C# and comes with **the following features**:

### Mail message generation
* Email templates can be fully individualized in terms of recipients, subject, HTML and/or plain text, attachments and even headers. Placeholders are inserted as variable names from data source between curly braces like so: ```{MailboxAddress.Name}``` or with formatting arguments like ```{Date:yyyy-MM-dd}```.
* HTML text may contain images from local hard disk, which will be automatically inserted as inline attachments.
* For HTML text ```MailMergeLib ``` can generate a plain text representation.
* Attachment sources can be files, streams or strings.
* The data source for email merge messages to a number of recipients and be any ```IEnumerable``` object as well as ```DataTable```s. The data source for single emails can be any of the following types: ```Dictionary<string,object>```, ```ExpandoObject```, ```DataRow```, any class instances or anonymous types. For class instances it's even allowed to use the name of parameter less methods.
* Placeholders in the email can be formatted with any of the features known from string.Format by using [SmartFormat.NET](https://github.com/scottrippey/SmartFormat.NET/wiki). SmartFormat is a parser coming close to string.Format's speed, but bringing a lot of additional options like easy pluralization for many languages.
* Resulting emails are MimeMessages from [MimeKit](https://github.com/jstedfast/MimeKit), an outstanding tool for creating and parsing emails, covering all relevant MIME standards making sure that emails are not qualified as SPAM.
* Support for international email address format.

### Sending email messages
* Practically unlimited number of parallel tasks to send out individualized emails to a big number of recipients.
* SmptClients for each task can get their own preconfigured settings, so that e.g. several mail servers can be used for one send job.
* Progress of processing emails can easily be observed with a number of events.
* SMTP failures can automatically be resolved supplying a backup configuration. This fault-tolerance is essential for unattended production systems.
* Emails are sent using the SmtpClient from [MailKit](https://github.com/jstedfast/MailKit), the sister project to MimeKit. SmtpClient is highly flexible and can be configured for literally every scenario you can think of.
* Instead of sending, emails can also be stored in MIME formatted text files, e.g. if a "pickup directory" from IIS or Microsoft Exchange shall be used. If needed, these files can be loaded back into a MimeMessage from MimeKit.

### Save and restore
* Messages and templates can be saved and loaded to/from XML files.
* Configuration settings for messages and SMTP can be stored to and loaded from an XML file.

### Both
* Fine grained control over the whole process of email message generation and distribution.
* Clearly out-performs .NET ```System.Net.Mail```.
* RFC standards compliant.
* We aks you not to use ```MailMergeLib``` for sending unsolicited bulk email.

### Supported Frameworks
* .Net Framework 4.6.1 and later
* .Net Standard 2.1 and later

[![Paypal-Donations](https://img.shields.io/badge/Donate-PayPal-important.svg?style=flat-square)](https://www.paypal.com/donate?hosted_button_id=KSC3LRAR26AHN)
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
[![AppVeyor tests (compact)](https://img.shields.io/appveyor/tests/axuno/mailmergelib?compact_message)](https://ci.appveyor.com/project/axuno/mailmergelib/branch/main)
[![CodeCoverage](https://codecov.io/gh/axuno/MailMergeLib/branch/main/graph/badge.svg)](https://codecov.io/gh/axuno/MailMergeLib/tree/a9ecf7e4bdf708cf0bc1f393136faa7c0de7875c/MailMergeLib)

```MailMergeLib``` version 5 is an SMTP mail client library which provides comfortable mail merge capabilities. ```MailMergeLib``` is written in C# and comes with the following features:
### What is *MailMergeLib*?

### 1. Mail message generation:
```MailMergeLib``` version 5 is an SMTP mail client library which provides comfortable mail merge capabilities. ```MailMergeLib``` is written in C# and comes with **the following features**:

### Mail message generation
* Email templates can be fully individualized in terms of recipients, subject, HTML and/or plain text, attachments and even headers. Placeholders are inserted as variable names from data source between curly braces like so: ```{MailboxAddress.Name}``` or with formatting arguments like ```{Date:yyyy-MM-dd}```.
* HTML text may contain images from local hard disk, which will be automatically inserted as inline attachments.
* For HTML text ```MailMergeLib ``` can generate a plain text representation.
Expand All @@ -20,31 +22,32 @@
* Resulting emails are MimeMessages from [MimeKit](https://github.com/jstedfast/MimeKit), an outstanding tool for creating and parsing emails, covering all relevant MIME standards making sure that emails are not qualified as SPAM.
* Support for international email address format.

### 2. Sending email messages:
### Sending email messages
* Practically unlimited number of parallel tasks to send out individualized emails to a big number of recipients.
* SmptClients for each task can get their own preconfigured settings, so that e.g. several mail servers can be used for one send job.
* Progress of processing emails can easily be observed with a number of events.
* SMTP failures can automatically be resolved supplying a backup configuration. This fault-tolerance is essential for unattended production systems.
* Emails are sent using the SmtpClient from [MailKit](https://github.com/jstedfast/MailKit), the sister project to MimeKit. SmtpClient is highly flexible and can be configured for literally every scenario you can think of.
* Instead of sending, emails can also be stored in MIME formatted text files, e.g. if a "pickup directory" from IIS or Microsoft Exchange shall be used. If needed, these files can be loaded back into a MimeMessage from MimeKit.

### 3. Save and restore:
### Save and restore
* Messages and templates can be saved and loaded to/from XML files.
* Configuration settings for messages and SMTP can be stored to and loaded from an XML file.

### 4. Both:
### Both
* Fine grained control over the whole process of email message generation and distribution.
* Clearly out-performs .NET ```System.Net.Mail```.
* RFC standards compliant.
* We aks you not to use ```MailMergeLib``` for sending unsolicited bulk email.

### 5. Supported Frameworks
### Supported Frameworks
* .Net Framework 4.6.1 and later
* .Net Standard 2.1 and later

[![Paypal-Donations](https://img.shields.io/badge/Donate-PayPal-important.svg?style=flat-square)](https://www.paypal.com/donate?hosted_button_id=KSC3LRAR26AHN)

### Get started
[![NuGet](https://img.shields.io/nuget/v/MailMergeLib.svg)](https://www.nuget.org/packages/MailMergeLib/) Install the NuGet package

[![Docs](https://img.shields.io/badge/docs-up%20to%20date-brightgreen.svg)](https://github.com/axuno/MailMergeLib/wiki)
Have a look at the [MailMergeLib Wiki](https://github.com/axuno/MailMergeLib/wiki)

5 changes: 5 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 5.8.1

* Fixed: Large embedded images could throw `UriFormatException`
* Package references: Set version range of compatible dependencies for `MailKit`, `MimeKit`, `SmartFormat.NET`, `YAXLib`

# 5.8.0

* Updated dependencies to latest versions
Expand Down
22 changes: 22 additions & 0 deletions Src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project>

<PropertyGroup>
<Product>MailMergeLib</Product>
<Company>axuno gGmbH</Company>
<Authors>axuno gGmbH, project maintainers and contributors.</Authors>
<CurrentYear>$([System.DateTime]::Now.ToString(yyyy))</CurrentYear>
<Copyright>Copyright 2011-$(CurrentYear) SmartFormat Project</Copyright>
<RepositoryUrl>https://github.com/axuno/MailMergeLib.git</RepositoryUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<Version>5.8.1</Version>
<FileVersion>5.8.1</FileVersion>
<AssemblyVersion>5.8.0</AssemblyVersion> <!--only update AssemblyVersion with major releases -->
<LangVersion>latest</LangVersion>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>Default</AnalysisMode>
<AnalysisModeSecurity>All</AnalysisModeSecurity>
<AnalysisLevel>latest</AnalysisLevel>
<Features>strict</Features>
</PropertyGroup>

</Project>
36 changes: 13 additions & 23 deletions Src/MailMergeLib.Tests/MailMergeLib.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,38 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>MailMergeLib is a mail message client library which provides comfortable mail merge capabilities for text, inline images and attachments, as well as good throughput and fault tolerance for sending mail messages.</Description>
<CurrentYear>$([System.DateTime]::Now.ToString(yyyy))</CurrentYear>
<Copyright>© 2007-$(CurrentYear) by axuno gGmbH</Copyright>
<Description>Test project for MailMergeLib</Description>
<AssemblyTitle>MailMergeLib.UnitTest</AssemblyTitle>
<Authors>axuno gGmbH</Authors>
<Version>5.8.0.0</Version>
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
<DefineConstants>$(DefineConstants)</DefineConstants>
<TargetFrameworks>net6.0;net461</TargetFrameworks>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<AssemblyName>MailMergeLib.Tests</AssemblyName>
<AssemblyOriginatorKeyFile>../MailMergeLib/MailMergeLib.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
<PackageId>MailMergeLib.Tests</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<Company>axuno gGmbH</Company>
<IsTestProject>true</IsTestProject>
<LangVersion>8</LangVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netcoreapp2.0|AnyCPU'">
<DocumentationFile />
<NoWarn>1701;1702;1591</NoWarn>
</PropertyGroup>

<ItemGroup>
<Compile Remove="project.*.json" />
</ItemGroup>

<ItemGroup>
<None Remove="packages.config" />
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<ErrorReport>prompt</ErrorReport>
<WarningLevel>3</WarningLevel>
<DefineConstants>RELEASE</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
Expand Down
60 changes: 27 additions & 33 deletions Src/MailMergeLib/MailMergeLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,45 @@

<PropertyGroup>
<Description>MailMergeLib is a mail message client library which provides comfortable mail merge capabilities for text, inline images and attachments, as well as good throughput and fault tolerance for sending mail messages.</Description>
<CurrentYear>$([System.DateTime]::Now.ToString(yyyy))</CurrentYear>
<Copyright>© 2007-$(CurrentYear) by axuno gGmbH</Copyright>
<AssemblyTitle>MailMergeLib</AssemblyTitle>
<Version>5.8.0.0</Version>
<AssemblyVersion>5.8.0.0</AssemblyVersion>
<FileVersion>5.8.0.0</FileVersion>
<Authors>axuno gGmbH</Authors>
<TargetFrameworks>netstandard2.1;net461;net50</TargetFrameworks>
<DefineConstants>TRACE;DEBUG;RELEASE</DefineConstants>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>MailMergeLib</AssemblyName>
<TargetFrameworks>netstandard2.1;net461</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<RootNamespace>MailMergeLib</RootNamespace>
<AssemblyOriginatorKeyFile>MailMergeLib.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PackageId>MailMergeLib</PackageId>
<PackageProjectUrl>https://github.com/axuno/MailMergeLib</PackageProjectUrl>
<PackageIcon>MailMergeLib_64x64.png</PackageIcon>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageLicenseUrl></PackageLicenseUrl>
<RepositoryUrl>https://github.com/axuno/MailMergeLib</RepositoryUrl>
<PackageReleaseNotes>See the change log with links to the Wiki for details of this release:
https://github.com/axuno/MailMergeLib/blob/master/ReleaseNotes.md</PackageReleaseNotes>
<PackageTags>smtp mime mail email merge template netcore netstandard netframework net50 c#</PackageTags>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder)</AllowedOutputExtensionsInPackageBuildOutputFolder>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<RootNamespace>MailMergeLib</RootNamespace>
<LangVersion>latest</LangVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
https://github.com/axuno/MailMergeLib/blob/main/ReleaseNotes.md</PackageReleaseNotes>
<Nullable>disable</Nullable>
<PackageTags>smtp mime mail email merge template netcore netstandard netframework c#</PackageTags>
<RepositoryType>Git</RepositoryType>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PropertyGroup>
<!-- EmbedUntrackedSources for deterministic build -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageReadmeFile>PkgReadMe.md</PackageReadmeFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>false</Optimize>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<WarningLevel>3</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
<DefineConstants>RELEASE</DefineConstants>
</PropertyGroup>

<ItemGroup>
Expand All @@ -52,10 +55,10 @@ https://github.com/axuno/MailMergeLib/blob/master/ReleaseNotes.md</PackageReleas

<ItemGroup>
<PackageReference Include="AngleSharp" Version="0.16.1" />
<PackageReference Include="MailKit" Version="3.1.1" />
<PackageReference Include="MimeKit" Version="3.1.1" />
<PackageReference Include="SmartFormat.NET" Version="2.7.2" />
<PackageReference Include="YAXLib" Version="3.0.1" />
<PackageReference Include="MailKit" Version="[3.0,4.0)" />
<PackageReference Include="MimeKit" Version="[3.0,4.0)" />
<PackageReference Include="SmartFormat.NET" Version="[2.5.0,2.7.2]" />
<PackageReference Include="YAXLib" Version="[3.0,4.0)" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand All @@ -68,16 +71,7 @@ https://github.com/axuno/MailMergeLib/blob/master/ReleaseNotes.md</PackageReleas

<ItemGroup>
<None Include="../../MailMergeLib_64x64.png" Pack="true" Visible="false" PackagePath="/" />
<None Include="../../PkgReadMe.md" Pack="true" PackagePath="/" />
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>bin\Release\MailMergeLib.xml</DocumentationFile>
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<Deterministic>true</Deterministic>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
</PropertyGroup>

</Project>
Loading

0 comments on commit 2ce476e

Please sign in to comment.