Application for handling email requests, specifically from MailAlertServer.
dotnet publish -c Release -r win-x64 --self-contained false -o publish
Compile setup.iss with Inno Setup. The resulting MailRequestServerSetup.exe will be placed in the Output directory.
Run MailRequestServerSetup.exe as Administrator. The installer will prompt for:
- Database Connection — SQL Server address, database name, and admin credentials with rights to create databases, tables, and logins.
- Application Database User — Username and password for a new SQL Server login that the application will use at runtime.
- 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.txtconfiguration file. - Install and start the MailRequestServer Windows service.
Use Add or Remove Programs in Windows. The uninstaller will stop and remove the Windows service automatically.
The application can also be configured manually via command line arguments or a configuration file.
Server=localhost
Database=MailRequestDB
Username=dbuser
Password=dbpassword
TrustServerCertificate=True
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.
MailRequestServer ConfigFile=config.txt
MailRequestServer Server=localhost Database=MailRequestDB Username=dbuser Password=dbpassword TrustServerCertificate=True