Mailing List Archive



Back to the month index Back to the list index

Fernando Maior (fmaior@upol.com.br)
Tue, 13 Apr 1999 09:22:02 -0300


Message-ID: <371336EA.E271403E@upol.com.br>
Date: Tue, 13 Apr 1999 09:22:02 -0300
From: Fernando Maior <fmaior@upol.com.br>
Subject: Lite and sendmail

Hi List,

On another message, Bambi showed me a piece of code to send mail from
within a Lite script. Now I would like to put the funct I created for
everybody use.

/***/
funct SendMail (char $To, char $Subj, char $Text)
{
    $fd = open ("/usr/sbin/sendmail -t",">|");
    fprintf($fd, "To: $To\n");
    fprintf($fd, "Subject: $Subj\n");
    fprintf($fd, "\n");
    fprintf($fd, "$Text\n");
    close($fd);
    return(1);
}

It is a little different from what Bambi sent me, and I suspect we are
using different linux flavors. Mine is RH5.1.

Also, I realized sendmail is running nice this way but with a delay of
approximately 1m35s. Well, my application selects a lot of clients from
the database and sends a number of mails for them. It means, if I send
50 mails, my Lite script will have to wait for sendmail for +- 1 hour!
Bad thing, I would like sendmail to immediately deliver mail.

Anyone know how to setup sendmail to do this?

I already went to <man sendmail> and was not clarified, even after
tests.

And, if I am off topic from this list, tell me which list must I go to
get this info.

Thanks,
Bye,
Fernando Maior