Pacific Blue Software Logo

Download the file : PBS Email Service

PBS Email Service


Version 1.0

A Windows service in Delphi that sends queued email over SMTP and collects POP3 mail to disk, with retries, attachments, a send journal and monitoring.



Free Delphi source code for a Windows service that is the only mail client your system needs. Your applications drop a small text file into a queue folder and the service sends it. Incoming mail is collected from a POP3 mailbox and written to disk as plain files, attachments and all. Nothing else links Indy or talks SMTP or POP3, so your servers stay small and the mail side can be restarted on its own.

Sending

  • Queue a message by writing one text file - from Delphi with the included TEmail_Send, or from any language
  • Several recipients, HTML or plain text, a display name, no-reply and high priority
  • Any number of attachments, read from disk when the message is sent
  • Transient failures are retried after a backoff; permanent failures are set aside with the reason in a file beside them
  • New mail always goes first, so a backlog of failing mail never holds up fresh mail
  • Old messages are abandoned after a set time, and a summary of failures can be emailed to an administrator
  • Redirect a test domain to one address, with the original recipients shown in the subject
  • A send journal, one JSON line per outcome, split by subject tag so live, test and training mail are reported apart

Receiving

  • Each message is saved as the raw .eml, a simple metadata and text body file, the HTML body and every attachment
  • Forwarded mail is unwrapped to the original sender, subject and date
  • The envelope recipient is kept, so several aliases on one mailbox can be told apart
  • An optional second copy of every message for a test system
  • A replay mode that processes an .eml from disk instead of the mailbox, for testing

Running it

  • Runs as a Windows service, or as a console program to watch it live, from the same code
  • Everything is set in one email.ini; the sender and receiver can each be turned off
  • Daily log files with an hourly heartbeat per thread, so a silent log means a stopped thread
  • An optional JSON status file for a watchdog or status console
  • Crashes are written to the Windows event log
  • Sent and failed files are tidied automatically after a set number of days

What is in the download

Full source for the service, its console twin, an SMTP test program and an .eml parser, the shared library units they use, a sample email.ini and PBS_Email_Service.md covering the queue file format, every setting, the received file formats and troubleshooting.

Requirements

  • Delphi 12 or 13, with the Indy components that ship with it
  • The OpenSSL DLLs for Indy, libeay32.dll and ssleay32.dll, beside the exe
  • An SMTP and a POP3 mailbox

Read the article : Send and Receive Email from Delphi Servers

(C) Copyright from 2026 by Pacific Blue Software Pty Ltd

Free for non-commercial use. Email for a commercial licence.


These links expire in one hour. Refresh the screen to extend the time.

Windows


Windows