5 Ways to Automate Notifications with febooti Command Line Email

febooti Command Line Email: Top Use Cases for DevOps and Monitoring

febootimail (Febooti Command Line Email) is a lightweight, scriptable Windows utility that sends emails from the command line with full SMTP, SSL/STARTTLS, authentication, attachments and rich-format options. Its simple CLI syntax, parameter substitution, debug logging, and integration-friendly features make it well suited for DevOps and monitoring workflows. Below are practical use cases, example commands, and best practices for each scenario.

1) Alerting from scheduled health checks

  • Use case: Send immediate email alerts when scheduled checks detect failures (disk space, service down, high CPU).
  • Why febootimail: Runs from Task Scheduler or cron-like jobs, supports return codes (errorlevel) so a monitoring script can conditionally email only on failure.
  • Example command:

    Code

    febootimail -SMTP smtp.example.com -FROM [email protected] -TO [email protected] -SUBJ “CRITICAL: DB service down on db01” -TEXT “Database service stopped on db01 at %DATE% %TIME%” -AUTH AUTO -USER monitor -PASS secret -SSL
  • Best practice: Include log snippets or attach the last N lines of a log file with -ATTACH and use -LOGFAILURE to centralize failure records.

2) Integration with CI/CD pipelines

  • Use case: Notify teams of build/test results, deployment status, or pipeline failures from Jenkins, Azure DevOps, GitHub Actions (on Windows runners) or custom CI scripts.
  • Why febootimail: Easy to call from build scripts or post-build steps; supports multiple recipients, CC/BCC, and per-recipient splitting (-TOEACH -SPLIT) for personalized delivery.
  • Example command (attachment of test report):

    Code

    febootimail -SMTP smtp.corp -FROM [email protected] -TO [email protected] -SUBJ “Build #123 — Failed Tests” -TEXT “See attached report.” -ATTACH C:\ci\reports\test-report.xml -AUTH AUTO -USER ci -PASS
  • Best practice: Use -SAVEEML on failures to keep an .eml copy for auditing and -LOGSUCCESS to capture successful notifications.

3) Automated report distribution

  • Use case: Daily/weekly distribution of generated reports (CSV, PDF, Excel) from data jobs, ETL processes, or business intelligence exports.
  • Why febootimail: Supports unlimited attachments, wildcards, and character-sets (UTF-8/Unicode); can read message body or recipient lists from files (-USEFILE).
  • Example (send all PDFs in output folder):

    Code

    febootimail -SMTP smtp.example.com -FROM [email protected] -TO [email protected] -SUBJ “Daily Reports” -TEXT “Attached are today’s reports.” -ATTACH “C:\jobs\reports*.pdf” -AUTH AUTO -USER reports -PASS pwd
  • Best practice: Generate recipient lists and message templates as files, then use -USEFILE for safe, repeatable jobs.

4) Monitoring log files and sending attachments on events

  • Use case: Watch a file or folder (via a small watcher script) and email relevant logs or crash dumps when specific error patterns appear.
  • Why febootimail: File masks, -IGNOREATTACHERRORS (-IAE), and ability to embed or attach large files make it ideal to ship evidence to responders.
  • Example (attach latest error log):

    Code

    febootimail -SMTP smtp.example.com -FROM [email protected] -TO [email protected] -SUBJ “Error detected in app01” -TEXT “Error pattern matched; see attached.” -ATTACH “C:\logs\app01\error-.log” -AUTH AUTO -USER watcher -PASS pwd -SSL
  • Best practice: Combine with log-rotating rules and compress attachments to avoid oversized emails.

5) Escalation and on-call rotation notifications

  • Use case: Send escalation chains or rotate on-call notifications with personalized messages.
  • Why febootimail: -TOEACH -SPLIT sends individual messages to many recipients; friendly names (-TONAME) and templates (-USEFILE) enable tailored content.
  • Example (send personalized alert to each on-call person listed in recipients.txt):

    Code

    febootimail -SMTP smtp.example.com -FROM [email protected] -TO -USEFILE recipients.txt -TOEACH -SPLIT -SUBJ “Pager Alert: Service X” -USEFILE message.txt -AUTH AUTO -USER alerts -PASS pw
  • Best practice: Keep secure credential storage outside scripts (use system account with restricted SMTP relay or a credential vault) and log deliveries for audit.

6) Debugging and automated troubleshooting workflows

  • Use case: Automatically capture diagnostic output (process lists, network traces) and email to support or a ticketing system when automated remediation fails.
  • Why febootimail: Advanced -DEBUG/-DEBUGX modes surface SMTP responses; -SAVEEML and -LOG options aid diagnostics.
  • Example (attach process list):

    Code

    tasklist /FO CSV > C:\tmp\procs.csv febootimail -SMTP smtp.example.com -FROM [email protected] -TO [email protected] -SUBJ “Auto-triage: process snapshot” -TEXT “Attached process list” -ATTACH C:\tmp\procs.csv -AUTH AUTO -USER triage -PASS pwd
  • Best practice: Use -DEBUG during initial integration; switch to -QUIET in production. Route mails to a ticketing input address to create incident records automatically.

Security and operational recommendations

  • Use SSL/STARTTLS and strong SMTP auth methods (NTLM/CRAM-MD5 where supported) rather than plaintext.
  • Avoid embedding credentials in plain scripts—use service accounts, environment-secure stores, or OS-level accounts that have SMTP relay rights.
  • Limit attachments size and compress large artifacts; consider uploading large artifacts to storage and include a secure link instead.
  • Use -LOG, -LOGFAILURE, -LOGSUCCESS and -SAVEEML to retain delivery evidence and to troubleshoot intermittent issues.
  • Use -DEBUGX temporarily when diagnosing authentication/TLS issues; be careful with logs that may include sensitive auth tokens.

Quick reference: core febootimail flags useful for DevOps

  • -SMTP / -SERVER — SMTP server
  • -PORT — SMTP port (default 587)
  • -AUTH / -USER / -PASS — Authentication
  • -SSL / -STARTTLS / -TLS — Secure transport
  • -TO / -CC / -BCC / -TOEACH -SPLIT — Recipients
  • -ATTACH / -IAE — Attach files, ignore attach errors
  • -USEFILE / -CONFIG — Parameter substitution from files
  • -DEBUG / -DEBUGX / -LOG / -SAVEEML — Troubleshooting & logging

Conclusion febootimail is a practical, low-footprint tool for integrating email notifications into Windows-based DevOps and monitoring workflows. Its CLI-first design, flexible attachment handling, and robust authentication/TLS options make it well suited for alerting, CI/CD notifications, automated report distribution, and diagnostic workflows. Implement secure credential handling, use logging for auditability, and leverage -USEFILE/-TOEACH for templating and personalization to maximize reliability and maintainability.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *