Free download from: http://www.magsys.co.uk/delphi/magics.asp

This new ICS component has been used in our ComCap application to send
emails for the last three months.  

Magenta Systems Mail Queue Component has two main benefits over a simple
TSslSmtpCli component: it supports extended retries over many hours or
days, and supports multiple SMTP relay servers, while alleviating the
need for the application to handle retries.  The component also allows
HTML mail to be sent using SSL, something THtmlSmtpCli does not currently
support. Mail is queued to disk, so retries will continue if the
application is restarted.  

TMagMailQueue is designed to prepare, queue and send email. Preparing the
email is done using the ICS THtmlSmtpCli component so it may be plain
text or HTML email with one or more file attachments.

Once the mail properties in QuHtmlSmtp have been specified, it is queued
using the QueueMail method which saves it to an EML spool file.

The component runs a thread which checks the queue for new EML spool
files, and attempts to forward them to one or more SMTP Mail Servers
using TSslSmtpCli, optionally with SSL. If mail delivery succeeds, the
spool file may be deleted or moved to an archive folder. If mail delivery
fails, the spool file remains in the queue and further attempts are made
separated by the times in minutes listed in the RetryList list. If all
delivery attempts fail, the spool file may be deleted or moved to a
badmail folder.

Note that some email servers support grey listing and reject the first
email attempt from a new sender but allow a retry 10 or 15 minutes later,
something that is very effective in blocking spam emails (since they
don't usually retry).

If multiple mail servers are specified, delivery is attempted once using
each server, for each retry attempt. Each mail server is specified as
TMailServer and there is no limit to the total.

Each time the queue is updated or a delivery attempt made, the queue is
saved to file in the control folder, so the component may be stopped and
restarted with failed attempts continuing.

The EML spool files are compatible with those created by many Microsoft
email applications such as CDO, and the AddtoQueue method can also be
used to queue existing EML files with the queue details specified in
MailQuItem.

Note, this component is intended for sending low volume email from
individual Delphi applications, with more flexibility than a simple
TSslSmtpCli component. For use as a heavy duty SMTP server, queue
processing could be improved to avoid moving records around as much or
saving them to disk as often, and mail bodies could be read as required
from disk instead of being read entirely to memory first. DNS look-up
could be added to find the MX records for each domain to send email
directly. A mail pickup folder could be added which is scanned for new
EML files. Finally, an SMTP server component could be added to accept new
email on port 25, and save it as EML files for redelivery. Beware such an
addition has various security implications for open relaying and spam
detection.

Angus

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to