From Xojo Documentation

Revision as of 06:57, 30 January 2022 by Gperlman (talk | contribs) (Sample Code)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Class (inherits from SSLSocket)

Used to retrieve messages on a POP3 mail server using SSL or TLS encryption.

ConnectionEstablished MessageReceived ServerAvailable
Disconnected MessagesCounted ServerCommandReply
ListReceived RollbackSuccessful ServerError
LoginSuccessful SendComplete TopLinesReceived
MessageDeleted SendProgress
Address Handle fa-lock-32.png SSLConnected fa-lock-32.png
BytesAvailable fa-lock-32.png IsConnected fa-lock-32.png SSLConnecting fa-lock-32.png
BytesLeftToSend fa-lock-32.png LocalAddress fa-lock-32.png SSLConnectionType
CertificateFile NetworkInterface SSLEnabled
CertificatePassword Password Username
CertificateRejectionFile Port
EncryptPassword RemoteAddress fa-lock-32.png

CheckServerConnection Lookahead RequestMessages
Close MessagesCounted RetrieveLinesAt
Connect Poll RetrieveMessageAt
Disconnect Purge RollbackServer
DisconnectFromServer ReadAll SendCommand
Listen RemoveMessageAt


The POP3SecureSocket class is identical to the POP3Socket class, except that it is derived from the SSLSocket class instead of the TCPSocket class. This enables you to send secure email by setting the Secure property of the SSLSocket class.

If you use a constructor of a subclass of POP3SecureSocket, you must call the Super class's constructor in your subclass's constructor. The subclass will not work unless this is done.

Sample Code

The following code in the MessageReceived event handler places the body of an email message in a TextArea.

Sub MessageReceived(ID As Integer, email As EmailMessage)
Var s As String
s = email.BodyHTML
If s = "" Then
s = email.BodyPlainText
End If
TextArea1.Text = s
End Sub

See Also

EmailMessage, HTTPSocket, POP3Socket, SMTPSecureSocket, SMTPSocket, SSLSocket, SocketCore, TCPSocket classes.]