SOCK_ not working on WebOS [edit] IT IS]

Previous topic - Next topic

ampos

The email thing does not work in WebOS. As it is so simple, I think it is something related with SOCK...

Code (glbasic) Select
DEBUG "Sent : "+sendEmail("njk@un-map.com","spots@un-map.com","Test 3","This is a test","<<email server here>>",26)

FUNCTION sendEmail%:from$,to$,subject$,message$,server$,port%
LOCAL socket%
LOCAL emailServer%
LOCAL LFCR$="\r\n"
LOCAL result%

IF SOCK_INIT()=FALSE THEN RETURN FALSE

socket%=SOCK_TCPCONNECT(server$,port%)
IF socket%>=0
SOCK_TCPSEND(socket%,"HELO "+from$+LFCR$)
SOCK_TCPSEND(socket%,"MAIL FROM: "+from$+LFCR$)
SOCK_TCPSEND(socket%,"RCPT TO: "+to$+LFCR$)
SOCK_TCPSEND(socket%,"DATA"+LFCR$)
SOCK_TCPSEND(socket%,"From: "+from$+LFCR$)
SOCK_TCPSEND(socket%,"To: "+to$+LFCR$)
SOCK_TCPSEND(socket%,"Subject: "+subject$+LFCR$)
SOCK_TCPSEND(socket%,message$+LFCR$)
SOCK_TCPSEND(socket%,"."+LFCR$)
SOCK_TCPSEND(socket%,"QUIT"+LFCR$)

SOCK_CLOSE(socket%)

result%=TRUE
ELSE
result%=FALSE
ENDIF

SOCK_SHUTDOWN

RETURN result%
ENDFUNCTION
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

MrTAToad

#1
As I mentioned previously, it does for me...

Sometimes it takes a little while, but it does work.

I've enquired with my web hosting people as to why it should work, when it shouldn't...

ampos

Yes, tested again, and it works.
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE