I am using vfp6 SP5 I am calling a com component through foxisapi,
everything works fine. The last part of the project is to create an email
when a page is submitted. I wanted to use a tool that could communicate
directly with an SMTP server. I used the following code with blat.dll (only
the relevant code is shown).
LOCAL lcDll, lcCmd, lnResult
lcDll = locFile("..\common\bin\blat.dll")
cBodyFile = tempFile("txt", .t.)
strToFile("Please do not resply to this message as it was generated by an
automated process", cBodyFile)
DECLARE INTEGER Send IN (lcDll) STRING blatstring
lcCmd = cBodyFile + ' -t ' + alltrim(Email) + ' -s "EDI" -f
stuff@address.com.au ' + '-server ' + alltrim(SMTPserver) + ' -attach ' +
oEDI.cFileName
lnResult = Send(lcCmd)
I also tried using a different approach with wwipstuff. Both have the same
problem, if I step through the code in a standard foxpro environment an
email is generated. If I run it through the web server, no email is
generated and the process completes but becomes unstable and eventually
locks up. To communicate directly with the mail server these processes must
be using sockets, so that must be causing the problem for them both to be
failing, but I don't understand how that could be. I downloaded the latest
version of Foxisapi from the MS site but it didn't help.
It's a tough one but I was hoping someone might have some insight into
what's going on.
Thanks.