######################################################################
sub send_message {
local ($tag);
sleep 3; # so screen can be read
open (TMPMSG, ">$work_dir_path/$outgoing") or die "eek! -- temp file";
if (defined TMPMSG)
{
&create_rewritten_message_file;
close (TMPMSG);
}
open (TMPMSG, "$work_dir_path/$outgoing");
if (defined TMPMSG)
{
# if not a multi-recipient piece (=99),
# and ok to write to disk, then we'll
# write this email directly to a disk
# file. Otherwise we'll attempt an SMTP
# conversation with a designated server.
if (($recipient < 99) && ($deliver_by_disk_write_ok))
{
&deliver_by_disk_write;
}
else
{
&deliver_via_smtp_host;
}
close (TMPMSG);
}
} # end of sub send_message