> On Wed, 02 May 2001, you wrote:
> > Just had a look, and apparently the Formmail scripts have been ported to
> > Win32 and use something called Blat instead of sendmail. Is
> there any reason
> > why we couldn't use Blat too? I'm looking into it to see if I can get it
> > working.
>
> ahh yes ...
> trouble is .. there must be half a dozen 'popular' mailers for win32
> ...blat is just one of many (or so I'm told) the only thing I remember is
> blat is a file based thing, you have to put your mail in a file on the
> disc and then tell blat to send it, at least thats the way formmial was
> using it.

Blat can be used the command-line way, by specifying '-' as the input file
(hey - a unix convention!)

The following snippet works like a dream.

        $mail_program='c:\winnt\system32\blat.exe';
        $from_field='My Lovely Site <[EMAIL PROTECTED]>';

        open (MAIL, "|$mail_program - -t \"$recipient\" -i \"$from_field\" -s
\"$subject\"");

Then just print to MAIL, and close the filehandle when you're done.

Of course, this comes back to the fact that the user will need to have
control of/know where the NT mailer exists, but I believe most NT hosting
services do install blat, and tell people where it is.

Reply via email to