Discussion:
(unknown)
Cristina Costin
2004-06-03 18:35:51 UTC
Permalink
Hi,

I want to use blat to send emails from Visual FoxPro 7.0 using SMTP. I
have created a bat file (attached- please change the extenssion).
If I execute this blc.bat file by dbl.click on it ,the email goes thru.
But I do not get any answer if I try to run this bat from Visual FoxPro
command window ( run blc.bat) .
Any suggestions?

Thanks,
Cristina


[Non-text portions of this message have been removed]




------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/dkFolB/TM
--------------------------------------------------------------------~->
--
Homepage:
http://www.blat.net
Tim Musson
2004-06-03 19:36:56 UTC
Permalink
Hey Cristina,

On Thursday, June 3, 2004 at 2:35:51 PM you wrote

CC> I want to use blat to send emails from Visual FoxPro 7.0 using SMTP. I
CC> have created a bat file (attached- please change the extenssion).
CC> If I execute this blc.bat file by dbl.click on it ,the email goes thru.
CC> But I do not get any answer if I try to run this bat from Visual FoxPro
CC> command window ( run blc.bat) .
CC> Any suggestions?

This list does not accept/pass attachments, if you want, copy/paste
the batch in a message.

When you post to the list, please include;
The version of Blat you are using,
The command line you used to run Blat (please use -debug),
The output of the -debug command.

Please change any eMail or server addresses - it is never
a good idea to send that information to a public list.
--
Tim Musson
Flying with The Bat! eMail v2.10.03
I'm planning to be spontaneous tomorrow.
Blat Manager, current version is 2.2.2, see www.blat.net



------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/dkFolB/TM
--------------------------------------------------------------------~->
--
Homepage:
http://www.blat.net
Cristina Costin
2004-06-04 13:08:02 UTC
Permalink
Thanks, Tim.

I use Blat 2.2.2 ( full version).

The batch line is :
blat blj.txt -debug -server mail.server.com -f ***@server.com
<mailto:***@server.com> -u xxxxxx -pw xxxxxx -attach c:\44040.txt -to
***@server.com <mailto:***@server.com> -sf jsubj.txt -log
emails.txt -timestamp

blj.txt : this is a test for blat
jsubj.txt : email confirmation

emails.txt does not have any record when I try to send from within VFP

Cristina





-----Original Message-----
From: Tim Musson [mailto:***@sdf.lonestar.org]
Sent: Thursday, June 03, 2004 3:37 PM
To: Cristina Costin
Subject: Re: [blat]


Hey Cristina,

On Thursday, June 3, 2004 at 2:35:51 PM you wrote

CC> I want to use blat to send emails from Visual FoxPro 7.0 using SMTP.
I
CC> have created a bat file (attached- please change the extenssion).
CC> If I execute this blc.bat file by dbl.click on it ,the email goes
thru.
CC> But I do not get any answer if I try to run this bat from Visual
FoxPro
CC> command window ( run blc.bat) .
CC> Any suggestions?

This list does not accept/pass attachments, if you want, copy/paste
the batch in a message.

When you post to the list, please include;
The version of Blat you are using,
The command line you used to run Blat (please use -debug),
The output of the -debug command.

Please change any eMail or server addresses - it is never
a good idea to send that information to a public list.
--
Tim Musson
Flying with The Bat! eMail v2.10.03
I'm planning to be spontaneous tomorrow.
Blat Manager, current version is 2.2.2, see www.blat.net
--
Homepage:
http://www.blat.net
Tim Musson
2004-06-04 14:06:23 UTC
Permalink
Hey Cristina,

On Friday, June 4, 2004 at 9:08:02 AM you wrote

CC> The batch line is :
CC> blat blj.txt -debug -server mail.server.com -f ***@server.com
CC> <mailto:***@server.com> -u xxxxxx -pw xxxxxx -attach c:\44040.txt -to
CC> ***@server.com <mailto:***@server.com> -sf jsubj.txt -log
CC> emails.txt -timestamp

CC> blj.txt : this is a test for blat
CC> jsubj.txt : email confirmation

CC> emails.txt does not have any record when I try to send from within VFP

Does the batch run ok calling it directly?

A couple of things look odd to me.

1. The way you formatted your eMail addresses is not correct.
-f ***@server.com <mailto:***@server.com>
Try leaving out the part in the <>, so it would look like this;
-f ***@server.com

2. You may want to use -attacht instead of -attach when attaching a
text file.
--
Tim Musson
Flying with The Bat! eMail v2.10.03
How do you get holy water?... Boil the hell out of it!
Blat Manager, current version is 2.2.2, see www.blat.net



------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/dkFolB/TM
--------------------------------------------------------------------~->
--
Homepage:
http://www.blat.net
Cristina Costin
2004-06-04 14:38:36 UTC
Permalink
Yes, the batch runs ok directly.
I did the changes, no improvement.

Cristina


-----Original Message-----
From: Tim Musson [mailto:***@sdf.lonestar.org]
Sent: Friday, June 04, 2004 10:06 AM
To: Cristina Costin
Subject: Re: [blat] using Blat with Visual FoxPro


Hey Cristina,

On Friday, June 4, 2004 at 9:08:02 AM you wrote

CC> The batch line is :
CC> blat blj.txt -debug -server mail.server.com -f ***@server.com
CC> <mailto:***@server.com> -u xxxxxx -pw xxxxxx -attach c:\44040.txt
-to
CC> ***@server.com <mailto:***@server.com> -sf jsubj.txt -log
CC> emails.txt -timestamp

CC> blj.txt : this is a test for blat
CC> jsubj.txt : email confirmation

CC> emails.txt does not have any record when I try to send from within
VFP

Does the batch run ok calling it directly?

A couple of things look odd to me.

1. The way you formatted your eMail addresses is not correct.
-f ***@server.com <mailto:***@server.com>
Try leaving out the part in the <>, so it would look like this;
-f ***@server.com

2. You may want to use -attacht instead of -attach when attaching a
text file.
--
Tim Musson
Flying with The Bat! eMail v2.10.03
How do you get holy water?... Boil the hell out of it!
Blat Manager, current version is 2.2.2, see www.blat.net
--
Homepage:
http://www.blat.net
Tim Musson
2004-06-04 15:34:42 UTC
Permalink
Hey Cristina,

On Friday, June 4, 2004 at 10:38:36 AM you wrote

CC> Yes, the batch runs ok directly.
CC> I did the changes, no improvement.

Then it sounds like VFP is having problems running the batch file...
--
Tim Musson
Flying with The Bat! eMail v2.10.03
Ambivalent? Well, yes and no.
Blat Manager, current version is 2.2.2, see www.blat.net



------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/dkFolB/TM
--------------------------------------------------------------------~->
--
Homepage:
http://www.blat.net
mbsoftwaresolutions
2004-06-03 19:43:07 UTC
Permalink
Post by Cristina Costin
Hi,
I want to use blat to send emails from Visual FoxPro 7.0 using
SMTP. I
Post by Cristina Costin
have created a bat file (attached- please change the extenssion).
If I execute this blc.bat file by dbl.click on it ,the email goes thru.
But I do not get any answer if I try to run this bat from Visual FoxPro
command window ( run blc.bat) .
Any suggestions?
Thanks,
Cristina
I use the BLAT.DLL as below:

IF !EMPTY(lcEmailAddr) THEN
* example code taken from web
lcDLLName="blat.dll"
lcDLLName=fullpath(lcDLLName)
DECLARE INTEGER Send in &lcDLLName STRING blatstring

* Write simple header file that will serve as main body
message in email
STRTOFILE("Oscar report generated at " + TTOC(DATETIME())
+ " by user " + ALLTRIM(SYS(0)) + " in directory " + CURDIR
(),"oscarreadme.txt")

* developer notes:
* - Using BLAT we won't have to worry about the end-user
having M$ Outlook or whatever...this should "cover more bases" for
us and lessen support issues
* - we could add a cc if necessary
* - if the client's name/acrynym is available, we could use
it instead of "MBSS User" for the -i parameter
* - we could make the server parameter use metadata rather
than hardcoding mail.yourserver.com
* - we could add the user's email address instead of
***@mbsoftwaresolutions.com for the -f parameter
lcString = [oscarreadme.txt -to ] + lcEmailAddr + [ -
s "Oscar file attached" -i "User" -server mail.yourserver.com -f
***@mbsoftwaresolutions.com -attach ] + pcFileIn
lcCmd = "Send(lcString)" && broke up into 2 parts (lcString
and lcCmd) for easier readability for developers if needing to debug
strtofile(lcString,"_emailstring.txt") && mjb 06-03-04
lnResult = &lcCmd && using macro expansion to get around
Build error created because of Send reference
IF lnResult = 0 THEN && successful send!
MESSAGEBOX("The OSCAR report was successfully
emailed to " + lcEmailAddr + ".",MB_ICONINFORMATION,"OSCAR report
sent to MBSS.")
ELSE && problem trying to send
MESSAGEBOX("There were problems trying to send the
OSCAR report to MBSS (Message code = " + ALLTRIM(STR(lnResult))
+ "). " + HELPMSG,MB_ICONSTOP,"Problem sending Oscar report.")
ENDIF && lnResult = 0
ENDIF && !empty(lcEmailAddr)

HTH!
--Michael (mbabcock at mbsoftwaresolutions dot com)



------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/dkFolB/TM
--------------------------------------------------------------------~->
--
Homepage:
http://www.blat.net
Cristina Costin
2004-06-04 15:13:01 UTC
Permalink
Thanks for the idea.
Works fine if the sender and the receiver are in the same domain, not
out of the domain.




-----Original Message-----
From: mbsoftwaresolutions [mailto:***@mbsoftwaresolutions.com]
Sent: Thursday, June 03, 2004 3:43 PM
To: ***@yahoogroups.com
Subject: [blat] Blat from VFP (was no subject)
Post by Cristina Costin
Hi,
I want to use blat to send emails from Visual FoxPro 7.0 using
SMTP. I
Post by Cristina Costin
have created a bat file (attached- please change the extenssion).
If I execute this blc.bat file by dbl.click on it ,the email goes thru.
But I do not get any answer if I try to run this bat from Visual FoxPro
command window ( run blc.bat) .
Any suggestions?
Thanks,
Cristina
I use the BLAT.DLL as below:

IF !EMPTY(lcEmailAddr) THEN
* example code taken from web
lcDLLName="blat.dll"
lcDLLName=fullpath(lcDLLName)
DECLARE INTEGER Send in &lcDLLName STRING blatstring

* Write simple header file that will serve as main body
message in email
STRTOFILE("Oscar report generated at " + TTOC(DATETIME())
+ " by user " + ALLTRIM(SYS(0)) + " in directory " + CURDIR
(),"oscarreadme.txt")

* developer notes:
* - Using BLAT we won't have to worry about the end-user
having M$ Outlook or whatever...this should "cover more bases" for
us and lessen support issues
* - we could add a cc if necessary
* - if the client's name/acrynym is available, we could use
it instead of "MBSS User" for the -i parameter
* - we could make the server parameter use metadata rather
than hardcoding mail.yourserver.com
* - we could add the user's email address instead of
***@mbsoftwaresolutions.com for the -f parameter
lcString = [oscarreadme.txt -to ] + lcEmailAddr + [ -
s "Oscar file attached" -i "User" -server mail.yourserver.com -f
***@mbsoftwaresolutions.com -attach ] + pcFileIn
lcCmd = "Send(lcString)" && broke up into 2 parts (lcString
and lcCmd) for easier readability for developers if needing to debug
strtofile(lcString,"_emailstring.txt") && mjb 06-03-04
lnResult = &lcCmd && using macro expansion to get around
Build error created because of Send reference
IF lnResult = 0 THEN && successful send!
MESSAGEBOX("The OSCAR report was successfully
emailed to " + lcEmailAddr + ".",MB_ICONINFORMATION,"OSCAR report
sent to MBSS.")
ELSE && problem trying to send
MESSAGEBOX("There were problems trying to send the
OSCAR report to MBSS (Message code = " + ALLTRIM(STR(lnResult))
+ "). " + HELPMSG,MB_ICONSTOP,"Problem sending Oscar report.")
ENDIF && lnResult = 0
ENDIF && !empty(lcEmailAddr)

HTH!
--Michael (mbabcock at mbsoftwaresolutions dot com)
--
Homepage:
http://www.blat.net
Cristina Costin
2004-06-04 15:14:59 UTC
Permalink
message error code = 1


-----Original Message-----
From: Cristina Costin [mailto:***@vintnersalliance.com]
Sent: Friday, June 04, 2004 11:13 AM
To: ***@yahoogroups.com
Subject: RE: [blat] Blat from VFP (was no subject)


Thanks for the idea.
Works fine if the sender and the receiver are in the same domain, not
out of the domain.




-----Original Message-----
From: mbsoftwaresolutions [mailto:***@mbsoftwaresolutions.com]
Sent: Thursday, June 03, 2004 3:43 PM
To: ***@yahoogroups.com
Subject: [blat] Blat from VFP (was no subject)
Post by Cristina Costin
Hi,
I want to use blat to send emails from Visual FoxPro 7.0 using
SMTP. I
Post by Cristina Costin
have created a bat file (attached- please change the extenssion).
If I execute this blc.bat file by dbl.click on it ,the email goes thru.
But I do not get any answer if I try to run this bat from Visual FoxPro
command window ( run blc.bat) .
Any suggestions?
Thanks,
Cristina
I use the BLAT.DLL as below:

IF !EMPTY(lcEmailAddr) THEN
* example code taken from web
lcDLLName="blat.dll"
lcDLLName=fullpath(lcDLLName)
DECLARE INTEGER Send in &lcDLLName STRING blatstring

* Write simple header file that will serve as main body
message in email
STRTOFILE("Oscar report generated at " + TTOC(DATETIME())
+ " by user " + ALLTRIM(SYS(0)) + " in directory " + CURDIR
(),"oscarreadme.txt")

* developer notes:
* - Using BLAT we won't have to worry about the end-user
having M$ Outlook or whatever...this should "cover more bases" for
us and lessen support issues
* - we could add a cc if necessary
* - if the client's name/acrynym is available, we could use
it instead of "MBSS User" for the -i parameter
* - we could make the server parameter use metadata rather
than hardcoding mail.yourserver.com
* - we could add the user's email address instead of
***@mbsoftwaresolutions.com for the -f parameter
lcString = [oscarreadme.txt -to ] + lcEmailAddr + [ -
s "Oscar file attached" -i "User" -server mail.yourserver.com -f
***@mbsoftwaresolutions.com -attach ] + pcFileIn
lcCmd = "Send(lcString)" && broke up into 2 parts (lcString
and lcCmd) for easier readability for developers if needing to debug
strtofile(lcString,"_emailstring.txt") && mjb 06-03-04
lnResult = &lcCmd && using macro expansion to get around
Build error created because of Send reference
IF lnResult = 0 THEN && successful send!
MESSAGEBOX("The OSCAR report was successfully
emailed to " + lcEmailAddr + ".",MB_ICONINFORMATION,"OSCAR report
sent to MBSS.")
ELSE && problem trying to send
MESSAGEBOX("There were problems trying to send the
OSCAR report to MBSS (Message code = " + ALLTRIM(STR(lnResult))
+ "). " + HELPMSG,MB_ICONSTOP,"Problem sending Oscar report.")
ENDIF && lnResult = 0
ENDIF && !empty(lcEmailAddr)

HTH!
--Michael (mbabcock at mbsoftwaresolutions dot com)
--
Homepage:
http://www.blat.net
Loading...