Discussion:
Blat Syntax - Not Mailing
(too old to reply)
TJ Paulson
2003-10-01 18:24:11 UTC
Permalink
I am working on a simple contact form in which the code refers to
blat.exe

I've specified the $mailprog = "blat.exe" in which Hostonce.com says
that you don't need a path, I'm hoping that is correct. Also in the
line we have the syntax of

`blat.exe -subject $subject -to $mailto -f $mailfrom -
body "$miscbody. $email, $name"`;

that I think should process the variables and email them, though I
may have this portion incorrect. If someone knows anything about
this and has time to help, I would appreciate it very, very much (
if you had any idea, lol )

TJ



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Upgrade to 128-Bit SSL Security!
http://us.click.yahoo.com/p7cEmB/s7qGAA/yigFAA/dkFolB/TM
---------------------------------------------------------------------~->
Tim Musson
2003-10-01 19:19:47 UTC
Permalink
Hey TJ,

My MUA believes you used eGroups-EW/0.82
to write the following on Wednesday, October 1, 2003 at 2:24:11 PM.

TP> I am working on a simple contact form in which the code refers to
TP> blat.exe

TP> I've specified the $mailprog = "blat.exe" in which Hostonce.com says
TP> that you don't need a path, I'm hoping that is correct.

They probably put it in the path, so it should be ok.

TP> Also in the line we have the syntax of

TP> `blat.exe -subject $subject -to $mailto -f $mailfrom -
TP> body "$miscbody. $email, $name"`;

Where is the $mailprog used then?

Also looking at the line above, you need a '-' right after blat.exe. So
putting your line above in a bit more readable format You would have;

,----- [ All on one line when you run it... :-) ]
| blat.exe
| -
| -subject $subject
| -to $mailto
| -f $mailfrom
| -body "$miscbody. $email, $name"
`-----

Note that first '-'. It is indicating to Blat that it should get the
message body from the -body switch and not a file.

TP> that I think should process the variables and email them, though I
TP> may have this portion incorrect. If someone knows anything about
TP> this and has time to help, I would appreciate it very, very much (
TP> if you had any idea, lol )

I am also wondering about a '-server mailhost' parm. Unless Blat is
pulling it from the Registry (which would surprise me on a hosting
site), you will want to put it in.

Any idea which version is in use there?
--
Tim Musson
Flying with The Bat! eMail v1.62q
Windows 2000 5.0.2195 (Service Pack 3)
Your mouse has moved. Windows must now reboot. Click OK to continue.
Blat Manager, current version is 2.2, see www.blat.net


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Upgrade to 128-Bit SSL Security!
http://us.click.yahoo.com/p7cEmB/s7qGAA/yigFAA/dkFolB/TM
---------------------------------------------------------------------~->
TJ Paulson
2003-10-01 19:38:06 UTC
Permalink
Tim Musson,

My entire code is this:

use CGI qw(param);
$name = param(name);
$email = param(email);
$mailto = "***@roadtohomeownership.com";
$mailprog = 'blat.exe';
$subject = "Contact Form";
$mailfrom = "feedback\@whateverdomain.com";
$miscbody = "insert some body text here";
#####################################################################
#################
`blat.exe - -subject $subject -to $mailto -f $mailfrom -
body "$miscbody. $email, $name"`;


print <<HTML
content-type: text/html

and then there's the response html beneath here.

My site, is simple I'd like to make sure it works before I try to
expand:

http://roadtohomeownership.com/ContactForm.htm

in which it reflects to the above cgi-script of chfeedpack.pl

The Blat Hostonce uses is version 1.8.5, and if it's any help to you
they're using the cgi module cgi.pm in the perl\lib folder.

I've modified the script under 'blat.exe - -subject up above, I hope
that is what you meant. Thanks for the help thus far.. it hasn't
worked yet.

TJ


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Upgrade to 128-Bit SSL Security!
http://us.click.yahoo.com/p7cEmB/s7qGAA/yigFAA/dkFolB/TM
---------------------------------------------------------------------~->
Tim Musson
2003-10-02 11:39:54 UTC
Permalink
Hey TJ,

My MUA believes you used eGroups-EW/0.82
to write the following on Wednesday, October 1, 2003 at 3:38:06 PM.

TP> My entire code is this:

TP> use CGI qw(param);
TP> $name = param(name);
TP> $email = param(email);
TP> $mailto = "***@roadtohomeownership.com";
TP> $mailprog = 'blat.exe';
TP> $subject = "Contact Form";
TP> $mailfrom = "feedback\@whateverdomain.com";
TP> $miscbody = "insert some body text here";
TP> #####################################################################
TP> #################
TP> `blat.exe - -subject $subject -to $mailto -f $mailfrom -
TP> body "$miscbody. $email, $name"`;

Then I would make the following changes (I indented the lines that I
didn't change)...

use CGI qw(param);
$name = param(name);
$email = param(email);
$mailto = "***@road-----p.com";
$mailprog = 'blat.exe';
$subject = "Contact Form";
$mailfrom = "feedback\@whateverdomain.com";
$miscbody = "insert some body text here";
$SMTPserver = "SMTP.server.name.tld - Don't forget to change this to your server";
######################################################################################
`$mailprog - -subject $subject -to $mailto -f $mailfrom -server $SMTPserver -body "$miscbody. $email, $name"`;

btw, Please change any eMail or server addresses - it is never a good
idea to send that information to a public list.

Also, I went to the form you indicated and filled it out and did a
submit, and it returned the following;
,-----
CGI Error

The specified CGI application misbehaved by not returning a complete set
of HTTP headers. The headers it did return are:

Can't find string terminator "'" anywhere before EOF at
E:\home\Default\ROADT--tim-changed--P.COM\htdocs\cgi-bin\chfeedback.pl
line 11.
`-----

This is saying you have a syntax error in your Perl file on line 11 or
thereabout. I would suggest you get an editor that does syntax
highlighting for you (I use vim at www.vim.org, but there are lots out
there). This will catch that type of thing easily.
--
Tim Musson
Flying with The Bat! eMail v1.62q
Windows 2000 5.0.2195 (Service Pack 3)
MS Windows -- From the people who brought you EDLIN!
Blat Manager, current version is 2.2, see www.blat.net


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Upgrade to 128-Bit SSL Security!
http://us.click.yahoo.com/p7cEmB/s7qGAA/yigFAA/dkFolB/TM
---------------------------------------------------------------------~->
TJ Paulson
2003-10-02 16:19:20 UTC
Permalink
Yeah Tim,

I made the changes you indicated on the script, it seems to be
processing just fine... yet still I am left without any incoming
mail.

I downloaded Vim and I'm trying to get that working so I can run
some tests on the code to see if there is anything else at all that
i'm missing.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Upgrade to 128-Bit SSL Security!
http://us.click.yahoo.com/p7cEmB/s7qGAA/yigFAA/dkFolB/TM
---------------------------------------------------------------------~->
Tim Musson
2003-10-02 16:39:55 UTC
Permalink
Hey TJ,

My MUA believes you used eGroups-EW/0.82
to write the following on Thursday, October 2, 2003 at 12:19:20 PM.

TP> I downloaded Vim and I'm trying to get that working so I can run
TP> some tests on the code to see if there is anything else at all that
TP> i'm missing.

If you want to send me the .pl file, I can take a quick look. You will
have to send it directly to me though, the list does not pass
attachments.

For testing, we can put the Blat command line in the output web page
too...
--
Tim Musson
Flying with The Bat! eMail v1.62q
Windows 2000 5.0.2195 (Service Pack 3)
Always remember to pillage BEFORE you burn.
Blat Manager, current version is 2.2, see www.blat.net


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Upgrade to 128-Bit SSL Security!
http://us.click.yahoo.com/p7cEmB/s7qGAA/yigFAA/dkFolB/TM
---------------------------------------------------------------------~->
TJ Paulson
2003-10-02 16:52:12 UTC
Permalink
Sure, how do you want me to send it to you?

You can messege me on yahoo messenger, tag Psychometra if you would
like and I can send it through to you there, or an email address
that will allow me to send it to you.

TJ


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Upgrade to 128-Bit SSL Security!
http://us.click.yahoo.com/p7cEmB/s7qGAA/yigFAA/dkFolB/TM
---------------------------------------------------------------------~->
Continue reading on narkive:
Loading...