Author Topic: SOCK_ not working on WebOS [edit] IT IS]  (Read 1099 times)

Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1600
    • View Profile
    • AMpostata Website
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
« Last Edit: 2011-Apr-18 by Kitty Hello »
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

  • Guest
Re: SOCK_ not working on WebOS
« Reply #1 on: 2011-Apr-18 »
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...
« Last Edit: 2011-Apr-18 by MrTAToad »

Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1600
    • View Profile
    • AMpostata Website
Re: SOCK_ not working on WebOS
« Reply #2 on: 2011-Apr-18 »
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