From 76cd7de38351db77f9a30b79c5470f7ba067c105 Mon Sep 17 00:00:00 2001 From: "manuel.sowada" Date: Sun, 5 Apr 2026 12:12:47 +0200 Subject: [PATCH] =?UTF-8?q?Initial=20commit=20=E2=80=93=20alle=20alten=20C?= =?UTF-8?q?ommits=20entfernt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 402 ++++++++++++++++++ MailSend_Lesebestätigung.sln | 37 ++ MailSend_Lesebestätigung/App.config | 32 ++ MailSend_Lesebestätigung/FHelp.Designer.cs | 67 +++ MailSend_Lesebestätigung/FHelp.cs | 46 ++ MailSend_Lesebestätigung/FHelp.resx | 120 ++++++ MailSend_Lesebestätigung/Form1.Designer.cs | 235 ++++++++++ MailSend_Lesebestätigung/Form1.cs | 180 ++++++++ MailSend_Lesebestätigung/Form1.resx | 120 ++++++ .../MailSend_Lesebestätigung.csproj | 117 +++++ MailSend_Lesebestätigung/Program.cs | 22 + .../Properties/AssemblyInfo.cs | 36 ++ .../Properties/Resources.Designer.cs | 70 +++ .../Properties/Resources.resx | 117 +++++ .../Properties/Settings.Designer.cs | 78 ++++ .../Properties/Settings.settings | 22 + README.md | 10 + 17 files changed, 1711 insertions(+) create mode 100644 .gitignore create mode 100644 MailSend_Lesebestätigung.sln create mode 100644 MailSend_Lesebestätigung/App.config create mode 100644 MailSend_Lesebestätigung/FHelp.Designer.cs create mode 100644 MailSend_Lesebestätigung/FHelp.cs create mode 100644 MailSend_Lesebestätigung/FHelp.resx create mode 100644 MailSend_Lesebestätigung/Form1.Designer.cs create mode 100644 MailSend_Lesebestätigung/Form1.cs create mode 100644 MailSend_Lesebestätigung/Form1.resx create mode 100644 MailSend_Lesebestätigung/MailSend_Lesebestätigung.csproj create mode 100644 MailSend_Lesebestätigung/Program.cs create mode 100644 MailSend_Lesebestätigung/Properties/AssemblyInfo.cs create mode 100644 MailSend_Lesebestätigung/Properties/Resources.Designer.cs create mode 100644 MailSend_Lesebestätigung/Properties/Resources.resx create mode 100644 MailSend_Lesebestätigung/Properties/Settings.Designer.cs create mode 100644 MailSend_Lesebestätigung/Properties/Settings.settings create mode 100644 README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ed6d1d2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,402 @@ +# ---> VisualStudio +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +# but not Directory.Build.rsp, as it configures directory-level build defaults +!Directory.Build.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml + diff --git a/MailSend_Lesebestätigung.sln b/MailSend_Lesebestätigung.sln new file mode 100644 index 0000000..d6e1295 --- /dev/null +++ b/MailSend_Lesebestätigung.sln @@ -0,0 +1,37 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.1.32407.343 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MailSend_Lesebestätigung", "MailSend_Lesebestätigung\MailSend_Lesebestätigung.csproj", "{35E64B1E-DF01-42BA-8CFF-7F2A555DAE8F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomControls", "..\DLLs\CustomControls\CustomControls.csproj", "{900E3B22-4F33-4922-906C-98CDD660E763}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SystemManagement", "..\DLLs\SystemManagement\SystemManagement.csproj", "{D1FB006D-DA04-4BD4-8827-C6899752A58E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {35E64B1E-DF01-42BA-8CFF-7F2A555DAE8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {35E64B1E-DF01-42BA-8CFF-7F2A555DAE8F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {35E64B1E-DF01-42BA-8CFF-7F2A555DAE8F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {35E64B1E-DF01-42BA-8CFF-7F2A555DAE8F}.Release|Any CPU.Build.0 = Release|Any CPU + {900E3B22-4F33-4922-906C-98CDD660E763}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {900E3B22-4F33-4922-906C-98CDD660E763}.Debug|Any CPU.Build.0 = Debug|Any CPU + {900E3B22-4F33-4922-906C-98CDD660E763}.Release|Any CPU.ActiveCfg = Release|Any CPU + {900E3B22-4F33-4922-906C-98CDD660E763}.Release|Any CPU.Build.0 = Release|Any CPU + {D1FB006D-DA04-4BD4-8827-C6899752A58E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D1FB006D-DA04-4BD4-8827-C6899752A58E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D1FB006D-DA04-4BD4-8827-C6899752A58E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D1FB006D-DA04-4BD4-8827-C6899752A58E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {ECF38AD2-4563-4DE5-94A2-674C552BD64C} + EndGlobalSection +EndGlobal diff --git a/MailSend_Lesebestätigung/App.config b/MailSend_Lesebestätigung/App.config new file mode 100644 index 0000000..9097ad6 --- /dev/null +++ b/MailSend_Lesebestätigung/App.config @@ -0,0 +1,32 @@ + + + + +
+ + + + + + + + + mailbody.html + + + ldapContainer + + + Vorname:givenname,Nachname:sn,Abteilung:department,E-Mail:mail,Personalnummer:employeeID,Benutzer:sAMAccountName + + + + + UserName:sn + Personalnummer:employeeID + + + + + + \ No newline at end of file diff --git a/MailSend_Lesebestätigung/FHelp.Designer.cs b/MailSend_Lesebestätigung/FHelp.Designer.cs new file mode 100644 index 0000000..980ee62 --- /dev/null +++ b/MailSend_Lesebestätigung/FHelp.Designer.cs @@ -0,0 +1,67 @@ +namespace MailSend_Lesebestätigung +{ + partial class FHelp + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.webBrowser1 = new System.Windows.Forms.WebBrowser(); + this.SuspendLayout(); + // + // webBrowser1 + // + this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; + this.webBrowser1.Location = new System.Drawing.Point(10, 39); + this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20); + this.webBrowser1.Name = "webBrowser1"; + this.webBrowser1.Size = new System.Drawing.Size(933, 741); + this.webBrowser1.TabIndex = 0; + // + // FHelp + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(953, 790); + this.Controls.Add(this.webBrowser1); + this.Name = "FHelp"; + this.Padding = new System.Windows.Forms.Padding(10, 39, 10, 10); + this.RegionBounds = new System.Drawing.Rectangle(19, 19, 953, 790); + this.SystemMenu = false; + this.Text = "FHelp"; + this.TitlebarBackColor = System.Drawing.Color.Black; + this.TitlebarForeColor = System.Drawing.SystemColors.Control; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FHelp_FormClosing); + this.Load += new System.EventHandler(this.FHelp_Load); + this.VisibleChanged += new System.EventHandler(this.FHelp_VisibleChanged); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.WebBrowser webBrowser1; + } +} \ No newline at end of file diff --git a/MailSend_Lesebestätigung/FHelp.cs b/MailSend_Lesebestätigung/FHelp.cs new file mode 100644 index 0000000..f3e1f61 --- /dev/null +++ b/MailSend_Lesebestätigung/FHelp.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MailSend_Lesebestätigung +{ + public partial class FHelp : FormEx + { + public FHelp() + { + InitializeComponent(); + } + + private void FHelp_Load(object sender, EventArgs e) + { + + } + + private void FHelp_VisibleChanged(object sender, EventArgs e) + { + if(this.Visible == true) + { + try + { + webBrowser1.Url = new Uri($@"{Application.StartupPath}\help.html"); + } + catch (Exception ex) + { + MessageBox.Show(ex.ToString()); + } + } + } + + private void FHelp_FormClosing(object sender, FormClosingEventArgs e) + { + this.Visible = false; + e.Cancel = true; + } + } +} diff --git a/MailSend_Lesebestätigung/FHelp.resx b/MailSend_Lesebestätigung/FHelp.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/MailSend_Lesebestätigung/FHelp.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MailSend_Lesebestätigung/Form1.Designer.cs b/MailSend_Lesebestätigung/Form1.Designer.cs new file mode 100644 index 0000000..78684a2 --- /dev/null +++ b/MailSend_Lesebestätigung/Form1.Designer.cs @@ -0,0 +1,235 @@ + +namespace MailSend_Lesebestätigung +{ + partial class Form1 + { + /// + /// Erforderliche Designervariable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Verwendete Ressourcen bereinigen. + /// + /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Vom Windows Form-Designer generierter Code + + /// + /// Erforderliche Methode für die Designerunterstützung. + /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.abtnShowMails = new System.Windows.Forms.AnimationButton(); + this.listViewEx1 = new System.Windows.Forms.ListViewEx(); + this.lADload = new System.Windows.Forms.Label(); + this.abtnAD = new System.Windows.Forms.AnimationButton(); + this.abtnSend = new System.Windows.Forms.AnimationButton(); + this.abtnPath = new System.Windows.Forms.AnimationButton(); + this.abtnHelp = new System.Windows.Forms.AnimationButton(); + this.tableLayoutPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 5; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 200F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 200F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 200F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 200F)); + this.tableLayoutPanel1.Controls.Add(this.abtnShowMails, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.listViewEx1, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.lADload, 2, 0); + this.tableLayoutPanel1.Controls.Add(this.abtnAD, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.abtnSend, 3, 2); + this.tableLayoutPanel1.Controls.Add(this.abtnPath, 3, 0); + this.tableLayoutPanel1.Controls.Add(this.abtnHelp, 4, 0); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(10, 39); + this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 3; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 49F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 62F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(1047, 505); + this.tableLayoutPanel1.TabIndex = 3; + // + // abtnShowMails + // + this.abtnShowMails.Anchor = System.Windows.Forms.AnchorStyles.None; + this.abtnShowMails.AutoSizeWidth = false; + this.abtnShowMails.Image = null; + this.abtnShowMails.ImageAutoSize = System.Windows.Forms.ImageAutoSizeDirection.Manual; + this.abtnShowMails.ImageBackColor = System.Drawing.Color.Empty; + this.abtnShowMails.ImageBounds = new System.Drawing.Rectangle(0, 0, 0, 0); + this.abtnShowMails.ImageMargin = 3; + this.abtnShowMails.ImagePadding = 0; + this.abtnShowMails.Location = new System.Drawing.Point(206, 4); + this.abtnShowMails.Margin = new System.Windows.Forms.Padding(4); + this.abtnShowMails.Name = "abtnShowMails"; + this.abtnShowMails.Size = new System.Drawing.Size(188, 41); + this.abtnShowMails.TabIndex = 7; + this.abtnShowMails.Text = "Zeige Serienbriefe"; + this.abtnShowMails.TextBounds = new System.Drawing.Rectangle(2, 2, 184, 37); + this.abtnShowMails.ToolTipText = ""; + this.abtnShowMails.Click += new System.EventHandler(this.abtnShowMails_Click); + // + // listViewEx1 + // + this.listViewEx1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.listViewEx1.ColumnFont = new System.Drawing.Font("Segoe UI", 9F); + this.tableLayoutPanel1.SetColumnSpan(this.listViewEx1, 5); + this.listViewEx1.Dock = System.Windows.Forms.DockStyle.Fill; + this.listViewEx1.DrawHeaderColors = true; + this.listViewEx1.FullRowSelect = true; + this.listViewEx1.GridLines = true; + this.listViewEx1.HideSelection = false; + this.listViewEx1.ItemLeftPadding = 5; + this.listViewEx1.Location = new System.Drawing.Point(0, 49); + this.listViewEx1.Margin = new System.Windows.Forms.Padding(0); + this.listViewEx1.Name = "listViewEx1"; + this.listViewEx1.OwnerDraw = true; + this.listViewEx1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(250)))), ((int)(((byte)(250)))), ((int)(((byte)(250))))); + this.listViewEx1.SelectionLine = false; + this.listViewEx1.Size = new System.Drawing.Size(1047, 394); + this.listViewEx1.TabIndex = 2; + this.listViewEx1.UseCompatibleStateImageBehavior = false; + this.listViewEx1.View = System.Windows.Forms.View.Details; + // + // lADload + // + this.lADload.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lADload.AutoSize = true; + this.lADload.Location = new System.Drawing.Point(404, 16); + this.lADload.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lADload.Name = "lADload"; + this.lADload.Size = new System.Drawing.Size(42, 16); + this.lADload.TabIndex = 4; + this.lADload.Text = "Bereit"; + // + // abtnAD + // + this.abtnAD.Anchor = System.Windows.Forms.AnchorStyles.None; + this.abtnAD.AutoSizeWidth = false; + this.abtnAD.Image = null; + this.abtnAD.ImageAutoSize = System.Windows.Forms.ImageAutoSizeDirection.Manual; + this.abtnAD.ImageBackColor = System.Drawing.Color.Empty; + this.abtnAD.ImageBounds = new System.Drawing.Rectangle(0, 0, 0, 0); + this.abtnAD.ImageMargin = 3; + this.abtnAD.ImagePadding = 0; + this.abtnAD.Location = new System.Drawing.Point(4, 4); + this.abtnAD.Margin = new System.Windows.Forms.Padding(4); + this.abtnAD.Name = "abtnAD"; + this.abtnAD.Size = new System.Drawing.Size(192, 41); + this.abtnAD.TabIndex = 3; + this.abtnAD.Text = "AD auslesen"; + this.abtnAD.TextBounds = new System.Drawing.Rectangle(2, 2, 188, 37); + this.abtnAD.ToolTipText = ""; + this.abtnAD.Click += new System.EventHandler(this.abtnAD_Click); + // + // abtnSend + // + this.abtnSend.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.abtnSend.AutoSizeWidth = false; + this.tableLayoutPanel1.SetColumnSpan(this.abtnSend, 2); + this.abtnSend.Image = null; + this.abtnSend.ImageAutoSize = System.Windows.Forms.ImageAutoSizeDirection.Manual; + this.abtnSend.ImageBackColor = System.Drawing.Color.Empty; + this.abtnSend.ImageBounds = new System.Drawing.Rectangle(0, 0, 0, 0); + this.abtnSend.ImageMargin = 3; + this.abtnSend.ImagePadding = 0; + this.abtnSend.Location = new System.Drawing.Point(916, 452); + this.abtnSend.Margin = new System.Windows.Forms.Padding(4); + this.abtnSend.Name = "abtnSend"; + this.abtnSend.Size = new System.Drawing.Size(127, 43); + this.abtnSend.TabIndex = 1; + this.abtnSend.Text = "Versenden"; + this.abtnSend.TextBounds = new System.Drawing.Rectangle(2, 2, 123, 39); + this.abtnSend.ToolTipText = ""; + this.abtnSend.Click += new System.EventHandler(this.animationButton1_Click); + // + // abtnPath + // + this.abtnPath.Anchor = System.Windows.Forms.AnchorStyles.None; + this.abtnPath.AutoSizeWidth = false; + this.abtnPath.Image = null; + this.abtnPath.ImageAutoSize = System.Windows.Forms.ImageAutoSizeDirection.Manual; + this.abtnPath.ImageBackColor = System.Drawing.Color.Empty; + this.abtnPath.ImageBounds = new System.Drawing.Rectangle(0, 0, 0, 0); + this.abtnPath.ImageMargin = 3; + this.abtnPath.ImagePadding = 0; + this.abtnPath.Location = new System.Drawing.Point(657, 4); + this.abtnPath.Margin = new System.Windows.Forms.Padding(4); + this.abtnPath.Name = "abtnPath"; + this.abtnPath.Size = new System.Drawing.Size(180, 41); + this.abtnPath.TabIndex = 5; + this.abtnPath.Text = "Öffne Serienbriefe im Explorer"; + this.abtnPath.TextBounds = new System.Drawing.Rectangle(2, 2, 176, 37); + this.abtnPath.ToolTipText = ""; + this.abtnPath.WordWrap = true; + this.abtnPath.Click += new System.EventHandler(this.abtnPath_Click); + // + // abtnHelp + // + this.abtnHelp.Anchor = System.Windows.Forms.AnchorStyles.None; + this.abtnHelp.AutoSizeWidth = false; + this.abtnHelp.Image = null; + this.abtnHelp.ImageAutoSize = System.Windows.Forms.ImageAutoSizeDirection.Manual; + this.abtnHelp.ImageBackColor = System.Drawing.Color.Empty; + this.abtnHelp.ImageBounds = new System.Drawing.Rectangle(0, 0, 0, 0); + this.abtnHelp.ImageMargin = 3; + this.abtnHelp.ImagePadding = 0; + this.abtnHelp.Location = new System.Drawing.Point(855, 4); + this.abtnHelp.Margin = new System.Windows.Forms.Padding(4); + this.abtnHelp.Name = "abtnHelp"; + this.abtnHelp.Size = new System.Drawing.Size(184, 41); + this.abtnHelp.TabIndex = 6; + this.abtnHelp.Text = "Bedienungsanleitung"; + this.abtnHelp.TextBounds = new System.Drawing.Rectangle(2, 2, 180, 37); + this.abtnHelp.ToolTipText = ""; + this.abtnHelp.Click += new System.EventHandler(this.abtnHelp_Click); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1067, 554); + this.Controls.Add(this.tableLayoutPanel1); + this.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); + this.Name = "Form1"; + this.Padding = new System.Windows.Forms.Padding(10, 39, 10, 10); + this.RegionBounds = new System.Drawing.Rectangle(19, 19, 1067, 554); + this.Text = "Form1"; + this.Load += new System.EventHandler(this.Form1_Load); + this.tableLayoutPanel1.ResumeLayout(false); + this.tableLayoutPanel1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.AnimationButton abtnSend; + private System.Windows.Forms.ListViewEx listViewEx1; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.AnimationButton abtnAD; + private System.Windows.Forms.Label lADload; + private System.Windows.Forms.AnimationButton abtnPath; + private System.Windows.Forms.AnimationButton abtnHelp; + private System.Windows.Forms.AnimationButton abtnShowMails; + } +} + diff --git a/MailSend_Lesebestätigung/Form1.cs b/MailSend_Lesebestätigung/Form1.cs new file mode 100644 index 0000000..0dc68ba --- /dev/null +++ b/MailSend_Lesebestätigung/Form1.cs @@ -0,0 +1,180 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.DirectoryServices; +using System.DirectoryServices.AccountManagement; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Net.Mail; +using System.Net.Mime; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MailSend_Lesebestätigung +{ + public partial class Form1 : FormEx + { + SynchronizationContext synccontext; + + private string mail_path = $@"{Application.StartupPath}\Serienbriefe"; + private FHelp helpForm = new FHelp(); + + + + public Form1() + { + InitializeComponent(); + } + + private void Form1_Load(object sender, EventArgs e) + { + Directory.CreateDirectory(mail_path); + listViewEx1.DoubleBuffer(true); + } + + private void abtnAD_Click(object sender, EventArgs e) + { + synccontext = SynchronizationContext.Current; + File.Delete("ad_users.csv"); + LoadADColumns(); + Task.Run(delegate + { + lADload.Loading("AD wird ausgelesen", "Fertig", () => + { + foreach (UserPrincipal user in ActiveDirectory.GetUsers(new PrincipalContext(ContextType.Domain, "Domainname", Properties.Settings.Default.LDAPcontainer))) + { + if (user.Enabled != true || user.GetProperty("employeeID") == "") + continue; + string[] userinfo = Properties.Settings.Default.ADuserProps.Split(',').Select(prop => user.GetProperty(prop.Split(':')[1])).ToArray(); + //string[] userinfo = { user.GetProperty("givenname"), user.GetProperty("sn"), user.GetProperty("department"), user.EmailAddress, user.GetProperty("employeeID"), user.SamAccountName }; + File.AppendAllText("ad_users.csv", $@"{string.Join(";", userinfo)}{Environment.NewLine}"); + var item = new ListViewItemEx(userinfo[0]); + item.SubItems.AddRange(userinfo.Skip(1).ToArray()); + listViewEx1.Invoke(new MethodInvoker(delegate { listViewEx1.Items.Add(item); })); + } + listViewEx1.Invoke(new MethodInvoker(delegate + { + listViewEx1.SortByColumn(1, SortOrder.Ascending); + listViewEx1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); + })); + }); + }); + } + + + private void LoadADColumns() + { + listViewEx1.Clear(); + listViewEx1.Columns.AddRange(Properties.Settings.Default.ADuserProps.Split(',').Select(prop => new ColumnHeader() { Text = prop.Split(':')[0], Name = prop.Split(':')[1] }).ToArray()); + } + + + private void LoadMailColumns() + { + listViewEx1.Clear(); + listViewEx1.Columns.Add("E-Mail"); + listViewEx1.Columns.Add("Dateiname"); + listViewEx1.Columns.Add("Fehler"); + } + + async private void animationButton1_Click(object sender, EventArgs e) + { + await GetMails(); + foreach (ListViewItemEx item in listViewEx1.Items) + { + try + { + string mailaddress = item.Text; + string filename = item.SubItems[1].Text; + string fullfilename = $@"{mail_path}\{mailaddress}\{filename}"; + + var mail = new SendMail("[Mailserver]", 25, "[Mail-User]", "[Mail-User-Pass]"); + Attachment attachment = new Attachment(fullfilename, new ContentType("application/vnd.openxmlformats-officedocument.wordprocessingml.document")); + MailMessage mailmessage = new MailMessage(new MailAddress("[Mail-Adress]", "[From]"), new MailAddress(mailaddress)) { IsBodyHtml = true }; + mailmessage.Subject = "Bestätigung zur Einhaltung der Verhaltensregeln"; + + string mailbody = File.ReadAllText(Properties.Settings.Default.MailBody); + + var user = ActiveDirectory.GetUser(new PrincipalContext(ContextType.Domain, "[Domainname], Properties.Settings.Default.LDAPcontainer), new MailAddress(mailaddress)); + + Properties.Settings.Default.MailBodyReplacements.Cast().ToList().ForEach(replacement => + { + mailbody = mailbody.Replace($"%{replacement.Split(':')[0]}%", user.GetProperty(replacement.Split(':')[1])); + }); + + + mailmessage.Body = mailbody; + //mailmessage.Body = File.ReadAllText(Properties.Settings.Default.MailBody).Replace("%UserName%", filename.Split(',')[0]); + mailmessage.Attachments.Add(attachment); + var send = mail.Send(mailmessage); + if (send == MailSendStatus.Fail) + { + item.HeaderColor = Color.OrangeRed; + item.SubItems.Add("Mail nicht versendet"); + } + else + { + item.HeaderColor = Color.Honeydew; + } + } + catch (Exception ex) + { + item.HeaderColor = Color.OrangeRed; + item.SubItems.Add("Mail nicht versendet"); + File.WriteAllText("log.log", ex.ToString() + Environment.NewLine + Environment.NewLine); + } + } + } + + + + async private Task GetMails() + { + LoadMailColumns(); + var dir = new DirectoryInfo(mail_path); + + foreach (var subdir in dir.GetDirectories()) + { + FileInfo file = subdir.GetFiles()[0]; + var item = new ListViewItemEx(subdir.Name); + item.SubItems.Add(new ListViewItem.ListViewSubItem(item, file.Name) { Name = listViewEx1.Columns[item.SubItems.Count].Name }); + + listViewEx1.Invoke(new MethodInvoker(delegate + { + listViewEx1.Items.Add((ListViewItemEx)item); + listViewEx1.EnsureVisible(listViewEx1.Items.Count - 1); + })); + + await Task.Delay(1); + } + listViewEx1.SortByColumn(1, SortOrder.Ascending); + listViewEx1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); + } + + + + private void abtnPath_Click(object sender, EventArgs e) + { + Process.Start(mail_path); + } + + private void abtnHelp_Click(object sender, EventArgs e) + { + if(helpForm.Visible == false) + helpForm.Show(); + else + helpForm.Hide(); + + } + + async private void abtnShowMails_Click(object sender, EventArgs e) + { + await GetMails(); + } + } +} diff --git a/MailSend_Lesebestätigung/Form1.resx b/MailSend_Lesebestätigung/Form1.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/MailSend_Lesebestätigung/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MailSend_Lesebestätigung/MailSend_Lesebestätigung.csproj b/MailSend_Lesebestätigung/MailSend_Lesebestätigung.csproj new file mode 100644 index 0000000..8ddf2b3 --- /dev/null +++ b/MailSend_Lesebestätigung/MailSend_Lesebestätigung.csproj @@ -0,0 +1,117 @@ + + + + + Debug + AnyCPU + {35E64B1E-DF01-42BA-8CFF-7F2A555DAE8F} + WinExe + MailSend_Lesebestätigung + MailSend_Lesebestätigung + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\DLLs\CustomGraphics\bin\Debug\CustomGraphics.dll + + + ..\..\DLLs\Extensions\bin\Debug\Extensions.dll + + + ..\..\DLLs\FormEx\bin\Debug\FormEx.dll + + + ..\..\Interfaces\ILog\bin\Debug\ILog.dll + + + + + + + + + + + + + + + ..\..\DLLs\SystemManagement\bin\Debug\SystemManagement.dll + + + ..\..\DLLs\XObjects\bin\Debug\XObjects.dll + + + + + Form + + + FHelp.cs + + + Form + + + Form1.cs + + + + + FHelp.cs + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + {900E3B22-4F33-4922-906C-98CDD660E763} + CustomControls + + + + \ No newline at end of file diff --git a/MailSend_Lesebestätigung/Program.cs b/MailSend_Lesebestätigung/Program.cs new file mode 100644 index 0000000..061859b --- /dev/null +++ b/MailSend_Lesebestätigung/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace MailSend_Lesebestätigung +{ + static class Program + { + /// + /// Der Haupteinstiegspunkt für die Anwendung. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/MailSend_Lesebestätigung/Properties/AssemblyInfo.cs b/MailSend_Lesebestätigung/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f281030 --- /dev/null +++ b/MailSend_Lesebestätigung/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die einer Assembly zugeordnet sind. +[assembly: AssemblyTitle("MailSend_Lesebestätigung")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MailSend_Lesebestätigung")] +[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly +// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von +// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. +[assembly: ComVisible(false)] + +// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +[assembly: Guid("35e64b1e-df01-42ba-8cff-7f2a555dae8f")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, +// indem Sie "*" wie unten gezeigt eingeben: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/MailSend_Lesebestätigung/Properties/Resources.Designer.cs b/MailSend_Lesebestätigung/Properties/Resources.Designer.cs new file mode 100644 index 0000000..d5a53f5 --- /dev/null +++ b/MailSend_Lesebestätigung/Properties/Resources.Designer.cs @@ -0,0 +1,70 @@ +//------------------------------------------------------------------------------ +// +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion: 4.0.30319.42000 +// +// Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn +// der Code neu generiert wird. +// +//------------------------------------------------------------------------------ + + +namespace MailSend_Lesebestätigung.Properties +{ + /// + /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + /// + // Diese Klasse wurde von der StronglyTypedResourceBuilder-Klasse + // über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + // mit der Option /str erneut aus, oder erstellen Sie Ihr VS-Projekt neu. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MailSend_Lesebestätigung.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/MailSend_Lesebestätigung/Properties/Resources.resx b/MailSend_Lesebestätigung/Properties/Resources.resx new file mode 100644 index 0000000..ffecec8 --- /dev/null +++ b/MailSend_Lesebestätigung/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/MailSend_Lesebestätigung/Properties/Settings.Designer.cs b/MailSend_Lesebestätigung/Properties/Settings.Designer.cs new file mode 100644 index 0000000..d3c98d7 --- /dev/null +++ b/MailSend_Lesebestätigung/Properties/Settings.Designer.cs @@ -0,0 +1,78 @@ +//------------------------------------------------------------------------------ +// +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 +// +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. +// +//------------------------------------------------------------------------------ + +namespace MailSend_Lesebestätigung.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.1.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("mailbody.html")] + public string MailBody { + get { + return ((string)(this["MailBody"])); + } + set { + this["MailBody"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("ou=Benutzer,ou=amt_67,ou=FFM,dc=city,dc=net,dc=ffm")] + public string LDAPcontainer { + get { + return ((string)(this["LDAPcontainer"])); + } + set { + this["LDAPcontainer"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("Vorname:givenname,Nachname:sn,Abteilung:department,E-Mail:mail,Personalnummer:emp" + + "loyeeID,Benutzer:sAMAccountName")] + public string ADuserProps { + get { + return ((string)(this["ADuserProps"])); + } + set { + this["ADuserProps"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("\r\n\r\n UserName:sn\r\n Personalnummer:employeeID\r\n")] + public global::System.Collections.Specialized.StringCollection MailBodyReplacements { + get { + return ((global::System.Collections.Specialized.StringCollection)(this["MailBodyReplacements"])); + } + set { + this["MailBodyReplacements"] = value; + } + } + } +} diff --git a/MailSend_Lesebestätigung/Properties/Settings.settings b/MailSend_Lesebestätigung/Properties/Settings.settings new file mode 100644 index 0000000..f22489b --- /dev/null +++ b/MailSend_Lesebestätigung/Properties/Settings.settings @@ -0,0 +1,22 @@ + + + + + + mailbody.html + + + ou=Benutzer,ou=amt_67,ou=FFM,dc=city,dc=net,dc=ffm + + + Vorname:givenname,Nachname:sn,Abteilung:department,E-Mail:mail,Personalnummer:employeeID,Benutzer:sAMAccountName + + + <?xml version="1.0" encoding="utf-16"?> +<ArrayOfString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <string>UserName:sn</string> + <string>Personalnummer:employeeID</string> +</ArrayOfString> + + + \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..864912b --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# SendMail + +Massen-Mailing-Client für personalisierte Nachrichten + +# TECHNICAL UNDERSTANDING + * Das Programm arbeitet ohne Datenbank + * Benutzer werden beim Programmstart aus einem Active Directory (änderbar) ausgelesen + * Es werden Benutzerinformationen (Benutzername, Personalnummer, E-Mail-Adresse) ausgelesen, die per Parameter in einen vordefinierten E-Mail-Text eingefügt werden. + * Es werden Ordner (Benennung: E-Mail-Adresse) angelegt, in denen Dateien abgelegt werden + * Mails werden personalisiert per Klick an alle versendet \ No newline at end of file