Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SMTP code not working
Message
From
14/06/2005 10:38:03
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
SMTP code not working
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Miscellaneous
Thread ID:
01023121
Message ID:
01023121
Views:
86
Hi, All

I found code for calling the SMTP server for sending email. But when I try to run the code, this line errors out:
    lResult = (ws_connect(THIS.hSocket, @cBuffer, LEN(cBuffer))=0)
The error is: "Cannot find Entry Point CONNECT in the DLL"

Here is the init that sets this up:
  PROCEDURE INIT()
    DECLARE INTEGER gethostbyname IN ws2_32 STRING HOST
    DECLARE STRING inet_ntoa IN ws2_32 INTEGER in_addr
    DECLARE INTEGER socket IN ws2_32 INTEGER af, INTEGER tp, INTEGER pt
    DECLARE INTEGER closesocket IN ws2_32 INTEGER s
    DECLARE INTEGER WSACreateEvent IN ws2_32
    DECLARE INTEGER WSACloseEvent IN ws2_32 INTEGER hEvent
    DECLARE GetSystemTime IN kernel32 STRING @lpSystemTime
    DECLARE INTEGER inet_addr IN ws2_32 STRING cp
    DECLARE INTEGER htons IN ws2_32 INTEGER hostshort
    DECLARE INTEGER WSAStartup IN ws2_32 INTEGER wVerRq, STRING lpWSAData
    DECLARE INTEGER WSACleanup IN ws2_32

    DECLARE INTEGER CONNECT IN ws2_32 AS ws_connect ;
      INTEGER s, STRING @sname, INTEGER namelen

    DECLARE INTEGER SEND IN ws2_32;
      INTEGER s, STRING @buf, INTEGER buflen, INTEGER flags

    DECLARE INTEGER recv IN ws2_32;
      INTEGER s, STRING @buf, INTEGER buflen, INTEGER flags

    DECLARE INTEGER WSAEventSelect IN ws2_32;
      INTEGER s, INTEGER hEventObject, INTEGER lNetworkEvents

    DECLARE INTEGER WSAWaitForMultipleEvents IN ws2_32;
      INTEGER cEvents, INTEGER @lphEvents, INTEGER fWaitAll,;
      INTEGER dwTimeout, INTEGER fAlertable

    DECLARE RtlMoveMemory IN kernel32 AS CopyMemory;
      STRING @DEST, INTEGER Src, INTEGER nLength
Does anyone know why this would be happening? Is it because I am using VFP6 instead of 8 or 9?

Thanks,
Beth
Next
Reply
Map
View

Click here to load this message in the networking platform