-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recipient lists are now provider based, and configurable from web.config. Added new configuration section to make the configuration easier to read and maintain. Recipient list providers are now the same for list and jobs. Updated the existing providers to use API controllers and moved logic to javascript to avoid tricky web forms timing issues.
- Loading branch information
Showing
59 changed files
with
2,864 additions
and
699 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0"?> | ||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> | ||
<configSections> | ||
<section name="epicodeNewsletter" type="BVNetwork.EPiSendMail.Configuration.NewsletterConfigurationSection, BVNetwork.EPiSendMail" | ||
xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/> | ||
</configSections> | ||
<epicodeNewsletter senderType="BVNetwork.EPiSendMail.Library.MailSenderNetSmtp, BVNetwork.EPiSendMail" | ||
xdt:Transform="InsertIfMissing"> | ||
<recipientListProviders> | ||
<add name="RecipientList" | ||
displayName="Add from one of your Recipient Lists" | ||
url="/modules/epicode.newsletter/plugin/itemproviders/recipientprovider.ascx" /> | ||
<add name="TextImport" | ||
displayName="Import from text" | ||
url="/modules/epicode.newsletter/plugin/itemproviders/TextImportProvider.ascx" /> | ||
<add name="EPiServerGroup" | ||
displayName="Add email addresses from an EPiServer Group" | ||
url="/modules/epicode.newsletter/plugin/itemproviders/EPiServerGroupProvider.ascx"/> | ||
<add name="CommerceUsers" | ||
displayName="Add email addresses from Commerce Contacts" | ||
url="/modules/epicode.newsletter/plugin/itemproviders/CommerceUsersProvider.ascx"/> | ||
</recipientListProviders> | ||
</epicodeNewsletter> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0"?> | ||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> | ||
<configSections> | ||
<section name="epicodeNewsletter" type="BVNetwork.EPiSendMail.Configuration.NewsletterConfigurationSection, BVNetwork.EPiSendMail" | ||
xdt:Locator="Match(name)" xdt:Transform="Remove"/> | ||
</configSections> | ||
<epicodeNewsletter senderType="BVNetwork.EPiSendMail.Library.MailSenderNetSmtp, BVNetwork.EPiSendMail" | ||
xdt:Transform="Remove"> | ||
<recipientListProviders> | ||
<add name="RecipientList" | ||
displayName="Add from one of your Recipient Lists" | ||
url="/modules/epicode.newsletter/plugin/itemproviders/recipientprovider.ascx" /> | ||
<add name="TextImport" | ||
displayName="Import from text" | ||
url="/modules/epicode.newsletter/plugin/itemproviders/TextImportProvider.ascx" /> | ||
<add name="EPiServerGroup" | ||
displayName="Add email addresses from an EPiServer Group" | ||
url="/modules/epicode.newsletter/plugin/itemproviders/EPiServerGroupProvider.ascx"/> | ||
<add name="CommerceUsers" | ||
displayName="Add email addresses from Commerce Contacts" | ||
url="/modules/epicode.newsletter/plugin/itemproviders/CommerceUsersProvider.ascx"/> | ||
</recipientListProviders> | ||
</epicodeNewsletter> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
src/Newsletter.Configuration/EPiCode.Newsletter.Configuration.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProductVersion>10.0.20723</ProductVersion> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectGuid>{495118BF-965F-41B3-8077-4A1D789FCE51}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>BVNetwork.EPiSendMail.Configuration</RootNamespace> | ||
<AssemblyName>BVNetwork.EPiSendMail.Configuration</AssemblyName> | ||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Configuration" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="NewsletterConfigurationSection1.csd.cs"> | ||
<AutoGen>True</AutoGen> | ||
<DesignTime>True</DesignTime> | ||
<DependentUpon>NewsletterConfigurationSection.csd</DependentUpon> | ||
</Compile> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" /> | ||
<Service Include="{B4F97281-0DBD-4835-9ED8-7DFB966E87FF}" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="NewsletterConfigurationSection.csd"> | ||
<Generator>CsdFileGenerator</Generator> | ||
<LastGenOutput>NewsletterConfigurationSection1.csd.cs</LastGenOutput> | ||
</None> | ||
<None Include="NewsletterConfigurationSection.csd.config"> | ||
<DependentUpon>NewsletterConfigurationSection.csd</DependentUpon> | ||
</None> | ||
<None Include="NewsletterConfigurationSection.csd.diagram"> | ||
<DependentUpon>NewsletterConfigurationSection.csd</DependentUpon> | ||
</None> | ||
<None Include="NewsletterConfigurationSection.csd.xsd"> | ||
<DependentUpon>NewsletterConfigurationSection.csd</DependentUpon> | ||
<SubType>Designer</SubType> | ||
</None> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
58 changes: 58 additions & 0 deletions
58
src/Newsletter.Configuration/NewsletterConfigurationSection.csd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configurationSectionModel xmlns:dm0="http://schemas.microsoft.com/VisualStudio/2008/DslTools/Core" dslVersion="1.0.0.0" Id="d0ed9acb-0435-4532-afdd-b5115bc4d562" namespace="BVNetwork.EPiSendMail.Configuration" xmlSchemaNamespace="NewsletterConfiguration" xmlns="http://schemas.microsoft.com/dsltools/ConfigurationSectionDesigner"> | ||
<typeDefinitions> | ||
<externalType name="String" namespace="System" /> | ||
<externalType name="Boolean" namespace="System" /> | ||
<externalType name="Int32" namespace="System" /> | ||
<externalType name="Int64" namespace="System" /> | ||
<externalType name="Single" namespace="System" /> | ||
<externalType name="Double" namespace="System" /> | ||
<externalType name="DateTime" namespace="System" /> | ||
<externalType name="TimeSpan" namespace="System" /> | ||
</typeDefinitions> | ||
<configurationElements> | ||
<configurationSection name="NewsletterConfigurationSection" codeGenOptions="Singleton, XmlnsProperty" xmlSectionName="epicodeNewsletter"> | ||
<attributeProperties> | ||
<attributeProperty name="SenderType" isRequired="false" isKey="false" isDefaultCollection="false" xmlName="senderType" isReadOnly="false"> | ||
<type> | ||
<externalTypeMoniker name="/d0ed9acb-0435-4532-afdd-b5115bc4d562/String" /> | ||
</type> | ||
</attributeProperty> | ||
</attributeProperties> | ||
<elementProperties> | ||
<elementProperty name="RecipientListProviders" isRequired="false" isKey="false" isDefaultCollection="false" xmlName="recipientListProviders" isReadOnly="false"> | ||
<type> | ||
<configurationElementCollectionMoniker name="/d0ed9acb-0435-4532-afdd-b5115bc4d562/RecipientListProviders" /> | ||
</type> | ||
</elementProperty> | ||
</elementProperties> | ||
</configurationSection> | ||
<configurationElementCollection name="RecipientListProviders" collectionType="AddRemoveClearMap" xmlItemName="recipientListProvider" codeGenOptions="Indexer, AddMethod, RemoveMethod, GetItemMethods"> | ||
<itemType> | ||
<configurationElementMoniker name="/d0ed9acb-0435-4532-afdd-b5115bc4d562/RecipientListProvider" /> | ||
</itemType> | ||
</configurationElementCollection> | ||
<configurationElement name="RecipientListProvider"> | ||
<attributeProperties> | ||
<attributeProperty name="Name" isRequired="true" isKey="true" isDefaultCollection="false" xmlName="name" isReadOnly="false"> | ||
<type> | ||
<externalTypeMoniker name="/d0ed9acb-0435-4532-afdd-b5115bc4d562/String" /> | ||
</type> | ||
</attributeProperty> | ||
<attributeProperty name="DisplayName" isRequired="true" isKey="false" isDefaultCollection="false" xmlName="displayName" isReadOnly="false"> | ||
<type> | ||
<externalTypeMoniker name="/d0ed9acb-0435-4532-afdd-b5115bc4d562/String" /> | ||
</type> | ||
</attributeProperty> | ||
<attributeProperty name="Url" isRequired="true" isKey="false" isDefaultCollection="false" xmlName="url" isReadOnly="false"> | ||
<type> | ||
<externalTypeMoniker name="/d0ed9acb-0435-4532-afdd-b5115bc4d562/String" /> | ||
</type> | ||
</attributeProperty> | ||
</attributeProperties> | ||
</configurationElement> | ||
</configurationElements> | ||
<propertyValidators> | ||
<validators /> | ||
</propertyValidators> | ||
</configurationSectionModel> |
38 changes: 38 additions & 0 deletions
38
src/Newsletter.Configuration/NewsletterConfigurationSection.csd.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
<auto-generated> | ||
This code was generated by a tool. | ||
Changes to this file may cause incorrect behavior and will be lost if | ||
the code is regenerated. | ||
</auto-generated> | ||
--> | ||
<configuration> | ||
<configSections> | ||
<section name="epicodeNewsletter" type="BVNetwork.EPiSendMail.Configuration.NewsletterConfigurationSection, BVNetwork.EPiSendMail.Configuration, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/> | ||
</configSections> | ||
<epicodeNewsletter senderType="BVNetwork.EPiSendMail.Library.MailSenderNetSmtp, BVNetwork.EPiSendMail" xmlns="NewsletterConfiguration"> | ||
<recipientListProviders> | ||
<add name="RecipientList" | ||
displayName="Add from one of your Recipient Lists" | ||
url="/modules/epicode.newsletter/plugin/recipientitemproviders/recipientprovider.ascx" /> | ||
<add name="TextImport" | ||
displayName="Import from text" | ||
url="/modules/epicode.newsletter/plugin/recipientitemproviders/TextImportProvider.ascx" /> | ||
<add name="EPiServerGroup" | ||
displayName="Add email addresses from an EPiServer Group" | ||
url="/modules/epicode.newsletter/plugin/recipientitemproviders/EPiServerGroupProvider.ascx"/> | ||
<add name="CommerceUsers" | ||
displayName="Add email addresses from an EPiServer Group" | ||
url="/modules/epicode.newsletter/plugin/recipientitemproviders/CommerceUsersProvider.ascx"/> | ||
</recipientListProviders> | ||
<!-- | ||
This is just a minimal sample configuration file that shows how to declare | ||
the configuration sections. | ||
Because an XML Schema Definition (XSD) is generated for each configuration | ||
section, it should be trivial to edit these files because you have | ||
IntelliSense on the XML definition. | ||
--> | ||
</epicodeNewsletter> | ||
</configuration> |
Oops, something went wrong.