File 'net/smtp/spooler.cls' (part of 'Pool_Net')


Home | Packages | Files | Procedures | Classes | Keywords | External packages


Written by
Andreas Kupries
Description
SMTP based spooler of outbound mail (found in files in halfbaked SMTP format).
Keywords
SMTP, spooler

Class 'smtpSpooler'

Description
Implements a file and directory based spooler for mails. See start for more. Uses smtpConnection to do the real work.
Options
command, from, helo, host, n
Membervariables
active, msgFiles
Methods
AllDone, Done, SpoolMessage, start

-command
The script to evaluate after the last mail was sent down the line.
-from
The address of the sender.
-helo
The initial string to send to the smtp demon
-host
The name of the host the smtp demon is running on.
-n
The number of simultaneously open connections to the smtp demon.

active
Boolean flag locking the object against multiple starts.
msgFiles
Contains the list of files containing the mails to sent to the smtp demon. Can be seens as a task queue as well, as it will be shortened during the operation.

AllDone (conn)

Called by conn after the channel to the smtp demon was closed. Simply destroys the connection
Argument: connThe smtpConnection in shutdown, to destroy.

Done (file conn)

Executed after SMTP transfer of file is finished. Removes the file in case of success. Always initiates the transfer of the next file.
Argument: fileName of the file transfered to the outside world.
Argument: connName of the used smtp descriptor array.

SpoolMessage ()

Initiates a SMTP session for the first message in the queue.

start (flist)

All specified files are forwarded to the given site, using the SMTP protocol. Files successfully transfered are deleted afterward. A partial transfer is enough to do so.
Notes: This procedure assumes that the files are in HB-SMTP format (half baked SMTP), as generated by the smail MTA. In such files the message is prepended with MAIL FROM, RCPT TO, DATA commands, and the standard EOM-indicator (. on a single line line) is appended.
Argument: flistList of files to transfer.


Generated by AutoDoc 2.1 at 02/20/1999, invoked by Andreas Kupries