Mail Daemon

«« Back
Description

Batch mail sending utility with configurable settings.
Mail Daemon validation

Source code

• GitHub: https://github.com/sergdrozdov/mail-daemon

Configuration
appSettings.json
Change MailProfile value to use a suitable mail configuration.
{
    "MailServer": {
        "SmtpHost": "<SMTP server>",
        "SmtpPort": 587,
        "SmtpUsername": "<username>",
        "SmtpPassword": "<password>",
        "SmtpEnableSSL": false
    },
    "App": {
        "MailProfile": "mailSettings_Default.json"
    },
    "Operator": {
      "address": "<valid email address>",
      "name": "<name>"
    }
}

Folders
MailProfiles – folder to store JSON mail profiles.
MailTemplates – folder to store mail templates.

mailSettings_Default.json
{
    "sender":
    {
        "address": "<mail address>",
        "name": "<name>"
    },
    "subject": "<subject>",
    "template": "<path to mail template>",
    "attachments": [
        {
            "path": "<path to file>",
            "filename": "<file name>"
        }
    ],
    "recipients": [
        {
            "address": "<mail address>",
            "name": "<name>",
            "subject": "<subject override parent>",
            "company": "<company>"
            "template": "<path to mail template override parent>"
            "attachments": [
                {
                    "path": "<path to file>",
                    "filename": "<file name>"
                }
            ],
        }
    ],
    "replace": {
        "text1": "<replace text>",
        "text2": "<replace text>"
    }
}

Text placeholders
{PERSON_NAME} – recipient name.
{COMPANY_NAME} – recipient company name.

Validation mode
Run Mail Daemon with attribute -v to validate JSON mail profile: no any mail sending, just validation. MailDaemon.exe -v
Run Mail Daemon with attributes -v -d to validate JSON mail profile: no any recipient mail sending, just validation and sending demo mail to sender address. MailDaemon.exe -v -d
Run Mail Daemon with attributes -v -d -gp -p to validate JSON mail profile: no any recipient mail sending, just validation and sending demo mail to sender address, -gp generate preview files, -p read profile configuration from custom-profile.json. MailDaemon.exe -v -d -gp -p custom-profile.json