Fix first real VSTO build, add sender account selection, polish deploy

First live build against real Visual Studio/VSTO tooling surfaced two
issues in the hand-written AddIn scaffold: ThisAddIn derived from the
wrong base type (OutlookAddIn is an interface, not the concrete
OutlookAddInBase class), and VSTO Application projects cannot build
without a signed ClickOnce manifest, so SignManifests is now on with a
throwaway self-signed test certificate. Both Core/Core.Tests/AddIn now
build clean and Core.Tests passes.

Also: mail always sent from Outlook's default account with no way to
pick a different one (e.g. a shared mailbox) - added a "From account"
setting (Session.Accounts dropdown in SettingsForm, SendUsingAccount in
MailSender). And added deploy/ with both a local ClickOnce publish
script (real install/uninstall via Windows Apps, no manual registry
editing) and a manual registry sideload fallback for scripted rollouts.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
redlineoandClaude Sonnet 5 committed 2026-07-24 09:51:52 +03:00
1 parent 7f0e0fdb23
commit 264ed74095
20 files changed
+756 -67

No files matched your search

@@ -33,6 +33,9 @@ namespace BulkArchiveMailer.AddIn.UI
private System.Windows.Forms.CheckBox chkTestModeDefault;
private System.Windows.Forms.Label lblFromAccount;
private System.Windows.Forms.ComboBox cboFromAccount;
private System.Windows.Forms.Label lblSshSubject;
private System.Windows.Forms.TextBox txtSshSubject;
private System.Windows.Forms.Label lblSshBody;
@@ -70,6 +73,9 @@ namespace BulkArchiveMailer.AddIn.UI
this.chkTestModeDefault = new System.Windows.Forms.CheckBox();
this.lblFromAccount = new System.Windows.Forms.Label();
this.cboFromAccount = new System.Windows.Forms.ComboBox();
this.lblSshSubject = new System.Windows.Forms.Label();
this.txtSshSubject = new System.Windows.Forms.TextBox();
this.lblSshBody = new System.Windows.Forms.Label();
@@ -121,6 +127,8 @@ namespace BulkArchiveMailer.AddIn.UI
this.tabGeneral.Controls.Add(this.btnBrowseSignature);
this.tabGeneral.Controls.Add(this.btnAutoDetectSignature);
this.tabGeneral.Controls.Add(this.chkTestModeDefault);
this.tabGeneral.Controls.Add(this.lblFromAccount);
this.tabGeneral.Controls.Add(this.cboFromAccount);
// lblArchiveFolder
this.lblArchiveFolder.Location = new System.Drawing.Point(15, 20);
@@ -176,6 +184,16 @@ namespace BulkArchiveMailer.AddIn.UI
this.chkTestModeDefault.Text = "По умолчанию открывать предпросмотр в тестовом режиме (сохранять в Черновики)";
this.chkTestModeDefault.UseVisualStyleBackColor = true;
// lblFromAccount
this.lblFromAccount.Location = new System.Drawing.Point(15, 284);
this.lblFromAccount.Size = new System.Drawing.Size(400, 20);
this.lblFromAccount.Text = "Отправлять от (аккаунт Outlook текущей сессии):";
// cboFromAccount
this.cboFromAccount.Location = new System.Drawing.Point(15, 307);
this.cboFromAccount.Size = new System.Drawing.Size(500, 23);
this.cboFromAccount.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
//
// tabSshAccess
//