Discussion:
No Email sent and Blat Locks Up.
(too old to reply)
fpdosman
2009-02-16 02:47:56 UTC
Permalink
Attempting to send email from a FoxPro DOS application utilizing a
simple test batch file - "C:\BLAT\Blat.exe - -to ***@thiscomp.com -s
test -q exit" - resulting in displaying the command line above, a
blinking cursor, and locking up without releasing back to the
application.

Blat v2.6.2 w/GSS encryption (build : Feb 25 2007 12:06:19)

Thank you for your support...
Chip
2009-02-16 15:42:07 UTC
Permalink
> Attempting to send email from a FoxPro DOS application utilizing a
> simple test batch file - "C:\BLAT\Blat.exe - -to ***@thiscomp.com -s
> test -q exit" - resulting in displaying the command line above, a
> blinking cursor, and locking up without releasing back to the
> application.
>
> Blat v2.6.2 w/GSS encryption (build : Feb 25 2007 12:06:19)
>
> Thank you for your support...


You did not tell Blat what to send as the message body, so it is waiting for
you to type in a message and press Ctrl-Z to end the input. The code is not
locked up, it is waiting for keyboard input.

Change the first hyphen to a file name, and your test will run.

--
Chip
fpdosman
2009-02-16 17:37:42 UTC
Permalink
--- In ***@yahoogroups.com, "Chip" <***@...> wrote:
>
> > Attempting to send email from a FoxPro DOS application utilizing a
> > simple test batch file - "C:\BLAT\Blat.exe - -to ***@... -s
> > test -q exit" - resulting in displaying the command line above, a
> > blinking cursor, and locking up without releasing back to the
> > application.
> >
> > Blat v2.6.2 w/GSS encryption (build : Feb 25 2007 12:06:19)
> >
> > Thank you for your support...
>
>
> You did not tell Blat what to send as the message body, so it is
waiting for
> you to type in a message and press Ctrl-Z to end the input. The
code is not
> locked up, it is waiting for keyboard input.
>
> Change the first hyphen to a file name, and your test will run.
>
> --
> Chip
>

Chip, thanks for the suggestion.
I found a sample of a simple command line and got it working.

I'm now making changes to fit the application.

Here is the current command line being generated by the application:

C:\BLAT\Blat.exe e_body -f e_from -to e_to -server
mail.-----.com -sf e_subj -log "C:\Blat\Blat.LOG"
@exit

And here is the log:

2009.02.16 12:28:15 (Mon)------------Start of Session-----------------
Blat v2.6.2 w/GSS encryption (build : Feb 25 2007 12:06:19)
unknown error code 2 when trying to open e_body
2009.02.16 12:28:15 (Mon)-------------End of Session------------------

e_body is a memo field variable within the FoxPro DOS 2.6
application.

Any suggestions would be appreciated...
Chip
2009-02-16 17:49:25 UTC
Permalink
> I found a sample of a simple command line and got it working.
>
> I'm now making changes to fit the application.
>
> Here is the current command line being generated by the application:
>
> C:\BLAT\Blat.exe e_body -f e_from -to e_to -server
> mail.-----.com -sf e_subj -log "C:\Blat\Blat.LOG"
> @exit
>
> And here is the log:
>
> 2009.02.16 12:28:15 (Mon)------------Start of Session-----------------
> Blat v2.6.2 w/GSS encryption (build : Feb 25 2007 12:06:19)
> unknown error code 2 when trying to open e_body
> 2009.02.16 12:28:15 (Mon)-------------End of Session------------------
>
> e_body is a memo field variable within the FoxPro DOS 2.6
> application.
>
> Any suggestions would be appreciated...


Blat does not know anything about Foxpro or variable substitutions. Someone
with Foxpro experience should chime in shortly, but essentially you will
need to replace those variables with actual data before you can hand off
control to Blat.

--
Chip
m***@rogers.com
2009-02-16 22:26:51 UTC
Permalink
tcom = "run blat blah blah " + alltrim(e_body) + " blah blah blah"
&tcom


watch the spaces around e_body, they are critical

Mike



On 16 Feb 2009 at 12:49, Chip wrote:

>
> > I found a sample of a simple command line and got it working.
> >
> > I'm now making changes to fit the application.
> >
> > Here is the current command line being generated by the application:
> >
> > C:\BLAT\Blat.exe e_body -f e_from -to e_to -server
> > mail.-----.com -sf e_subj -log "C:\Blat\Blat.LOG"
> > @exit
> >
> > And here is the log:
> >
> > 2009.02.16 12:28:15 (Mon)------------Start of Session-----------------
> > Blat v2.6.2 w/GSS encryption (build : Feb 25 2007 12:06:19)
> > unknown error code 2 when trying to open e_body
> > 2009.02.16 12:28:15 (Mon)-------------End of Session------------------
> >
> > e_body is a memo field variable within the FoxPro DOS 2.6
> > application.
> >
> > Any suggestions would be appreciated...
>
> Blat does not know anything about Foxpro or variable substitutions. Someone
> with Foxpro experience should chime in shortly, but essentially you will
> need to replace those variables with actual data before you can hand off
> control to Blat.
>
> --
> Chip
>
>
>




[Non-text portions of this message have been removed]
m***@rogers.com
2009-02-17 14:18:00 UTC
Permalink
Realized that e_body might be the actual message and not just the name of a text file. Life is simpler if you use
the name of the file.

Sending the text is more difficult because the message will be parsed by the Foxpro app before it goes to blat, and
if the message contains a reserved character, you are out of luck!

Typically you have to remove " ' - \ / ? * and likely a few more before you can get the data out, so your code
shoud look like


cleantext = cleaned(alltrim(e_body))
tcom = "run blat blah blah ' " + cleantext + " ' blah blah blah"
&tcom



PROCEDURE Cleaned
parameter mytext
notclean = .t.
DO WHILE notclean
if " ' " $ mytext
mytext = substr(mytext,at("'",mytext)-1) + substr(mytext,at("'",mytext)+1)

endif
if "-"


scan for all characters you want to remove

Theoretically you can wrap the offending characters in quotes, but then you have several opportunies for Foxpro,
Blat, the email server, the email client or the browser to go wron, best to limit messages to numbers and letters

Note that I added protected single quotes before and after cleantext, that protects spaces in the message



On 16 Feb 2009 at 17:26, ***@rogers.com wrote:

>
> tcom = "run blat blah blah " + alltrim(e_body) + " blah blah blah"
> &tcom
>
> watch the spaces around e_body, they are critical
>
> Mike
>
> On 16 Feb 2009 at 12:49, Chip wrote:
>
> >
> > > I found a sample of a simple command line and got it working.
> > >
> > > I'm now making changes to fit the application.
> > >
> > > Here is the current command line being generated by the application:
> > >
> > > C:\BLAT\Blat.exe e_body -f e_from -to e_to -server
> > > mail.-----.com -sf e_subj -log "C:\Blat\Blat.LOG"
> > > @exit
> > >
> > > And here is the log:
> > >
> > > 2009.02.16 12:28:15 (Mon)------------Start of Session-----------------
> > > Blat v2.6.2 w/GSS encryption (build : Feb 25 2007 12:06:19)
> > > unknown error code 2 when trying to open e_body
> > > 2009.02.16 12:28:15 (Mon)-------------End of Session------------------
> > >
> > > e_body is a memo field variable within the FoxPro DOS 2.6
> > > application.
> > >
> > > Any suggestions would be appreciated...
> >
> > Blat does not know anything about Foxpro or variable substitutions. Someone
> > with Foxpro experience should chime in shortly, but essentially you will
> > need to replace those variables with actual data before you can hand off
> > control to Blat.
> >
> > --
> > Chip
> >
> >
> >
>
> [Non-text portions of this message have been removed]
>
>
>




[Non-text portions of this message have been removed]
Continue reading on narkive:
Loading...