POP3Socket.Connect

From Real Software Documentation

Jump to: navigation, search
Method
POP3Socket.Connect ( )

Connects to the mail server and logs in with the values in the Username and Password properties.


Example

This example is the code in the Connect button on the demoWindow layout in the email example that ships with Real Studio. The example in in the Internet folder in the Examples folder.

if me.caption = "Connect" then
socket1.address = nthField(serverFld.text,":",1)
socket1.port = val(nthField(serverFld.text,":",2))
if socket1.port = 0 then
socket1.port = 110
end
Socket1.encryptPassword=true
socket1.username = usernameFld.text
socket1.password = passwordFld.text

progressBar1.maximum = 0
socket1.connect
me.caption = "Disconnect"
else
socket1.disconnectFromServer
me.caption = "Connect"
end
Personal tools