Discussion:
Blat on Win2k Server using formmail.pl
(too old to reply)
lakota_sniper1
2003-05-13 17:24:44 UTC
Permalink
I am new to using Blat in a Windows environment.

I am used to using formmail.pl and sendmail, but we have a Windows
webserver now and need to be able to submit forms and send to a
specified recipient.

Here is the line that I have updated so I can troubleshoot, but it's
not writing the logs.

$BLAT_ARGS = "$WIN_TEMPFILE -t $Config{'recipient'} -server
mail.domain.com -debug -log C:/WINNT/Temp/Blatlog.txt";

$mailprog = 'http://<server>/cgi-bin/blat.exe'; I have also
tried ../cgi-bin/blat.exe and blat.exe none of them worked for me.
The formmail.pl exists in the same directory as blat.exe. Could that
be the problem?

@referers = are set correctly

@recipients = &fill_recipients(are set correctly)

Formmail.pl returns the expected results when I submit my form <form
ACTION="../cgi-bin/formmail.pl" METHOD="post">, which then calls the
blat.exe from the formmail.pl.

But no email is sent and no log file is created. I know for a fact
that C:/WINNT/Temp/ has the ability to be written to cause the
formmail.XXXX are being stored there, but they are never being sent
via email..

I was able to send messsages by just using Blat and they sent fine,
but now that I would like to utilize formmail to format the message
it's not working.

What am I doing wrong? Any help will be greatly apprecitated.

Regards
Chad


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/YoVfrB/XP.FAA/uetFAA/dkFolB/TM
---------------------------------------------------------------------~->
Tim Musson
2003-05-13 17:32:34 UTC
Permalink
Hey lakota_sniper1,

My MUA believes you used eGroups-EW/0.82
to write the following on Tuesday, May 13, 2003 at 1:24:44 PM.

l> Here is the line that I have updated so I can troubleshoot, but it's
l> not writing the logs.

l> $BLAT_ARGS = "$WIN_TEMPFILE -t $Config{'recipient'} -server
l> mail.domain.com -debug -log C:/WINNT/Temp/Blatlog.txt";

l> $mailprog = 'http://<server>/cgi-bin/blat.exe'; I have also
l> tried ../cgi-bin/blat.exe and blat.exe none of them worked for me.
l> The formmail.pl exists in the same directory as blat.exe. Could that
l> be the problem?

Either of the $mailprog options should work. Try dumping out the
contents of $BLAT_ARGS to a file and pasting it here so we can pick it
apart. I am guessing that may be the problem.

,----- [ like this ]
| open(BlatArgs, "> C:/WINNT/Temp/BlatArgs.txt");
| print BlatArgs $BLAT_ARGS;
`-----
--
Tim Musson
Flying with The Bat! eMail v1.62q
Windows 2000 5.0.2195 (Service Pack 2)
Don't get old, you will live to regret it.
Blat FAQ @ http://blat.freeshell.org/faq/


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/YoVfrB/XP.FAA/uetFAA/dkFolB/TM
---------------------------------------------------------------------~->
lakota_sniper1
2003-05-13 17:42:22 UTC
Permalink
Thank you for replying so quickly

Here are the results of the BlatArgs

c:\winnt\Temp\formmail.3072 -t c-***@raytheon.com -server <smtp
server>.com -debug -log C:/WINNT/Temp/Blatlog.txt
Post by Tim Musson
Hey lakota_sniper1,
My MUA believes you used eGroups-EW/0.82
to write the following on Tuesday, May 13, 2003 at 1:24:44 PM.
l> Here is the line that I have updated so I can troubleshoot, but it's
l> not writing the logs.
l> $BLAT_ARGS = "$WIN_TEMPFILE -t $Config{'recipient'} -server
l> mail.domain.com -debug -log C:/WINNT/Temp/Blatlog.txt";
l> $mailprog = 'http://<server>/cgi-bin/blat.exe'; I have also
l> tried ../cgi-bin/blat.exe and blat.exe none of them worked for me.
l> The formmail.pl exists in the same directory as blat.exe. Could that
l> be the problem?
Either of the $mailprog options should work. Try dumping out the
contents of $BLAT_ARGS to a file and pasting it here so we can pick it
apart. I am guessing that may be the problem.
,----- [ like this ]
| open(BlatArgs, "> C:/WINNT/Temp/BlatArgs.txt");
| print BlatArgs $BLAT_ARGS;
`-----
--
Tim Musson
Flying with The Bat! eMail v1.62q
Windows 2000 5.0.2195 (Service Pack 2)
Don't get old, you will live to regret it.
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs from home.
Over 14,500 titles. Free Shipping
& No Late Fees. Try Netflix for FREE!
http://us.click.yahoo.com/BVVfoB/hP.FAA/uetFAA/dkFolB/TM
---------------------------------------------------------------------~->
Tim Musson
2003-05-13 18:38:14 UTC
Permalink
Hey lakota_sniper1,

My MUA believes you used eGroups-EW/0.82
to write the following on Tuesday, May 13, 2003 at 1:42:22 PM.

l> Here are the results of the BlatArgs

l> c:\winnt\Temp\formmail.3072 -t ***@r.com -server <smtp
server>>.com -debug -log C:/WINNT/Temp/Blatlog.txt

So, I am assuming you changed <smtp server>>.com, and I changed the
eMail address above.

that looks good, next thing I would do is cut and paste it to Blat on
the command line, or possibly just copy the file to testblat.bat and put
Blat in front of the line. If the formmail.nnnn temp file still exists,
things should work just fine. If the temp file is gone, please create
one in that folder and substitute.

Let us know what you get...
--
Tim Musson
Flying with The Bat! eMail v1.62q
Windows 2000 5.0.2195 (Service Pack 2)
Experience is something you don't get until just after you need it.
Blat FAQ @ http://blat.freeshell.org/faq/


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs from home.
Over 14,500 titles. Free Shipping
& No Late Fees. Try Netflix for FREE!
http://us.click.yahoo.com/BVVfoB/hP.FAA/uetFAA/dkFolB/TM
---------------------------------------------------------------------~->
lakota_sniper1
2003-05-13 18:47:14 UTC
Permalink
I think I have it working now. It was looking for a -f with a valid
email address before it would execute.

I was able to submit fine from command by typing Blat and then the
exact string in the the args, but when I tried to execute from the
form itself it was looking for a -f with a valid email. Does that
sound right?

Do I need to have the -f to actually execute Blat using formmail.pl?
Post by Tim Musson
Hey lakota_sniper1,
My MUA believes you used eGroups-EW/0.82
to write the following on Tuesday, May 13, 2003 at 1:42:22 PM.
l> Here are the results of the BlatArgs
server>>.com -debug -log C:/WINNT/Temp/Blatlog.txt
So, I am assuming you changed <smtp server>>.com, and I changed the
eMail address above.
that looks good, next thing I would do is cut and paste it to Blat on
the command line, or possibly just copy the file to testblat.bat and put
Blat in front of the line. If the formmail.nnnn temp file still exists,
things should work just fine. If the temp file is gone, please
create
Post by Tim Musson
one in that folder and substitute.
Let us know what you get...
--
Tim Musson
Flying with The Bat! eMail v1.62q
Windows 2000 5.0.2195 (Service Pack 2)
Experience is something you don't get until just after you need it.
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/YoVfrB/XP.FAA/uetFAA/dkFolB/TM
---------------------------------------------------------------------~->
Tim Musson
2003-05-13 19:15:22 UTC
Permalink
Hey lakota_sniper1,

My MUA believes you used eGroups-EW/0.82
to write the following on Tuesday, May 13, 2003 at 2:47:14 PM.

l> I think I have it working now. It was looking for a -f with a valid
l> email address before it would execute.

l> I was able to submit fine from command by typing Blat and then the
l> exact string in the the args, but when I tried to execute from the
l> form itself it was looking for a -f with a valid email. Does that
l> sound right?

l> Do I need to have the -f to actually execute Blat using formmail.pl?

Blat will need to either get the -f parm from the registry (put there by
-install) or the command line...
--
Tim Musson
Flying with The Bat! eMail v1.62q
Windows 2000 5.0.2195 (Service Pack 2)
The software said it required Windows 3.1 or better so I installed
Linux.
Blat FAQ @ http://blat.freeshell.org/faq/


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/YoVfrB/XP.FAA/uetFAA/dkFolB/TM
---------------------------------------------------------------------~->
lakota_sniper1
2003-05-13 19:19:18 UTC
Permalink
Ok, thank you so much for your help
Post by Tim Musson
Hey lakota_sniper1,
My MUA believes you used eGroups-EW/0.82
to write the following on Tuesday, May 13, 2003 at 2:47:14 PM.
l> I think I have it working now. It was looking for a -f with a valid
l> email address before it would execute.
l> I was able to submit fine from command by typing Blat and then the
l> exact string in the the args, but when I tried to execute from the
l> form itself it was looking for a -f with a valid email. Does that
l> sound right?
l> Do I need to have the -f to actually execute Blat using
formmail.pl?
Post by Tim Musson
Blat will need to either get the -f parm from the registry (put there by
-install) or the command line...
--
Tim Musson
Flying with The Bat! eMail v1.62q
Windows 2000 5.0.2195 (Service Pack 2)
The software said it required Windows 3.1 or better so I installed
Linux.
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/YoVfrB/XP.FAA/uetFAA/dkFolB/TM
---------------------------------------------------------------------~->
Bunmi Ogunjemiyo
2003-05-13 18:37:27 UTC
Permalink
I have used formmailnt.pl on win2k and it works fine. This is the formmail
modified by matt for use with blat has some slight modification of the Unix
version. It's out there somewhere on Matts archive site in case you want to
get that.

the &mailprog parameter should be
$mailprog = 'c:/winnt/system32/blat.exe';

make sure that the following parameters are specified as indicated. I just
copied this directly from matt formmailnt.pl file

# SERVER_OS defines the server Operating System if other that UNIX

$SERVER_OS="WIN";

# WIN_TEMPFILE is needed to store the mail as it's built.
# this is only required if SERVER_OS is set to "WIN"
# This directory should be writable by the webserver, but not
# directly accessible from the web.

$WIN_TEMPFILE="c:/winnt/temp/formmail.$$";
Hope this helps




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs from home.
Over 14,500 titles. Free Shipping
& No Late Fees. Try Netflix for FREE!
http://us.click.yahoo.com/BVVfoB/hP.FAA/uetFAA/dkFolB/TM
---------------------------------------------------------------------~->
Brett Atha
2003-05-13 18:52:51 UTC
Permalink
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/YoVfrB/XP.FAA/uetFAA/dkFolB/TM
---------------------------------------------------------------------~->
lakota_sniper1
2003-05-13 19:17:32 UTC
Permalink
I just want to say thank you to everyone that responded back to me on
this issue. I took a little tweakin', but it is now submitting.
Thanks again for all your suggestions for troubleshooting. This is a
great asset.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/YoVfrB/XP.FAA/uetFAA/dkFolB/TM
---------------------------------------------------------------------~->
Romson Christer
2003-05-14 06:40:02 UTC
Permalink
Post by Tim Musson
Post by lakota_sniper1
Do I need to have the -f to actually execute Blat using formmail.pl?
Blat will need to either get the -f parm from the registry (put there
by -install) or the command line.
And this is in the user specific part of the registry, right? So the
-install
(and lakota_sniper1's tests) must be run logged in under the same
account as the one the web server uses, for all things to be equal. The
web server should run under an account that is disabled for regular login,
so either the regisre entry has to be copied manually or you include the
-f and -server on the command line. And since you want to have all
relevant settings in one place, -f and -server on the command line is
preferable to using registry settings anyway.

Christer

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs from home.
Over 14,500 titles. Free Shipping
& No Late Fees. Try Netflix for FREE!
http://us.click.yahoo.com/BVVfoB/hP.FAA/uetFAA/dkFolB/TM
---------------------------------------------------------------------~->
Tim Musson
2003-05-14 11:25:03 UTC
Permalink
Hey Christer,

My MUA believes you used Internet Mail Service (5.5.2653.19)
to write the following on Wednesday, May 14, 2003 at 2:40:02 AM.

RC> And this is in the user specific part of the registry, right? So the
RC> -install (and lakota_sniper1's tests) must be run logged in under
RC> the same account as the one the web server uses, for all things to
RC> be equal. The web server should run under an account that is
RC> disabled for regular login, so either the regisre entry has to be
RC> copied manually or you include the -f and -server on the command
RC> line. And since you want to have all relevant settings in one place,
RC> -f and -server on the command line is preferable to using registry
RC> settings anyway.

I had not thought of that issue, thanks for pointing it out!
--
Tim Musson
Flying with The Bat! eMail v1.62q
Windows 2000 5.0.2195 (Service Pack 2)
A person with a green thumb has a sore back and red knees to match
Blat FAQ @ http://blat.freeshell.org/faq/


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/YoVfrB/XP.FAA/uetFAA/dkFolB/TM
---------------------------------------------------------------------~->
squale1949
2003-05-14 23:38:59 UTC
Permalink
A method that I have used is to create a simple BLAT management web
page that has a form that asks for the required information. Then
clicking on the Submit button causes a CGI to run that does the
BLAT -install and to be nice use BLAT -profile to echo back the
settings to a web page.

This will run under the same context as the webserver, and gives you
a nice simple way to manage BLAT.

Oh, I would suggest including a password field to prevent an
unauthorized user from making these changes.

Pat
Post by Tim Musson
Hey Christer,
My MUA believes you used Internet Mail Service (5.5.2653.19)
to write the following on Wednesday, May 14, 2003 at 2:40:02 AM.
RC> And this is in the user specific part of the registry, right? So the
RC> -install (and lakota_sniper1's tests) must be run logged in under
RC> the same account as the one the web server uses, for all things to
RC> be equal. The web server should run under an account that is
RC> disabled for regular login, so either the regisre entry has to be
RC> copied manually or you include the -f and -server on the command
RC> line. And since you want to have all relevant settings in one place,
RC> -f and -server on the command line is preferable to using
registry
Post by Tim Musson
RC> settings anyway.
I had not thought of that issue, thanks for pointing it out!
--
Tim Musson
Flying with The Bat! eMail v1.62q
Windows 2000 5.0.2195 (Service Pack 2)
A person with a green thumb has a sore back and red knees to match
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/YoVfrB/XP.FAA/uetFAA/dkFolB/TM
---------------------------------------------------------------------~->
Loading...