I'm trying to communicate with gmail through the use the POP3 protocol. I've searched the web and the forums and found very little information floating around when it comes to using a secure socket with livecode. currently I'm only trying to verify communication with the "+OK ..." response from the server. I setup my address with the following code;
Code: Select all
put "gmail_pop_address" into serverAddress
put any line of hostnameToAddress(serverAddress) into socketAddress
put ":995" after socketAddress
This sets me up with an ip address and port wich i've verified is correct. Then I have tried opening a secure socket with the following methods;
Attempt 1:
Code: Select all
open socket to socketAddress with message "socketOpen"
on socketOpen
secure socket socketAddress
read from socket socketAddress until CRLF
answer "Data: " & it
end socketOpen
Attempt 2:
Code: Select all
open secure socket to socketAddress with message "socketOpen"
on socketOpen
read from socket socketAddress until CRLF
answer "Data: " & it
end socketOpen
Both attempts result in a connection being made as well as a dialog box that just contains "Data:" and no response, which you would think meant that it received at the bare minimum a CRLF ending, but even if i try to check the length of the response it comes up to 0. Please note that the code above is not a direct copy and paste from my project but an adaptation of what methods I've used. I also have a provision for a connection timeout which works when i try to connect to a non-SSL port like 110. Both POP3 or IMAP will work for my project, so information on either is welcome. I've also tried (unsuccessfully) working with Sarah Reichelt's POP library with a few modifications for SSL. I have also verified the working of the server side POP3 connection using a web based tester. I would prefer to build a small library for my particular application versus using a pre-built one, I rather enjoy learning new protocols.
Information you may want...
Livecode version - 7.0.6
Development OS - Windows/Linux(Ubuntu 15.04)
Application target OS - Both windows and Linux but primarily Linux
Thank you for any input.