Skip to content

Repository files navigation

MailRequestServer

Application for handling email requests, specifically from MailAlertServer.

Build

1. Publish the application

dotnet publish -c Release -r win-x64 --self-contained false -o publish

2. Build the installer

Compile setup.iss with Inno Setup. The resulting MailRequestServerSetup.exe will be placed in the Output directory.

Installation

Run MailRequestServerSetup.exe as Administrator. The installer will prompt for:

  1. Database Connection — SQL Server address, database name, and admin credentials with rights to create databases, tables, and logins.
  2. Application Database User — Username and password for a new SQL Server login that the application will use at runtime.
  3. SMTP Configuration — SMTP server, port, credentials, sender name, and sender email address.

The installer will:

  • Create the database if it does not exist.
  • Create the MailAlerts, MailConfig, and MailRequests tables.
  • Create the application SQL Server login and database user.
  • Insert the SMTP settings into the MailConfig table.
  • Write the config.txt configuration file.
  • Install and start the MailRequestServer Windows service.

Uninstallation

Use Add or Remove Programs in Windows. The uninstaller will stop and remove the Windows service automatically.

Manual Configuration

The application can also be configured manually via command line arguments or a configuration file.

Config File

Server=localhost
Database=MailRequestDB
Username=dbuser
Password=dbpassword
TrustServerCertificate=True

Command Line Arguments

Server=**ServerIP** - The SQL Server node name or IP address.  Default: Server=localhost
Database=**Database Name** - The database where the mail requests are kept.  Default: Database=MailRequestDB
Username=**User Name** - The username required for logging into the SQL Server database.  Default: Username=dbuser
Password=**Password** - The password required for logging into the SQL Server database.  Default: Password=dbpassword
TrustServerCertificate=**True|False** - Whether to trust the SQL Server certificate without validation.  Default: TrustServerCertificate=True
ConfigFile=**Configuration File Name** - The path to a configuration file.  Default: N/A

Notes:

  • Any unspecified setting will be set to the default.
  • If a ConfigFile is specified the settings in the file will take priority and other arguments will be ignored.

Examples

MailRequestServer ConfigFile=config.txt
MailRequestServer Server=localhost Database=MailRequestDB Username=dbuser Password=dbpassword TrustServerCertificate=True

About

Email Request Service using SQL Queries

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages