This property specifies whether current connection uses STLS command to enable SSL/TLS.
Data Type: Long
| Value | Meaning |
| 0 | Direct SSL/TLS(default) |
| 1 | STLS (this value is not available for IMAP4 server.) |
Remarks
Usually, there are two ways to deploy POP3 server to SSL/TLS, one is deploying POP3 port as direct SSL/TLS connection, another way is switching connection from normal channel to SSL/TLS channel by STLS command(rfc 2595). Therefore, you should choose the appropriate value for SSL_stls property upon your POP3 server configuration.
Usage Example
[Visual Basic]
Sub SSL_direct_connect()
Dim oPop3 As New ANPOPLib.POPMAIN
oPop3.SSL_stls = 0
''POP3 servers usually use this port as alone SSL/TLS port
oPop3.ServerPort = 995
''To connect IMAP4 server by SSL, please using the following code.
'oPop3.ServerPort = 993
'oPop3.IMAP4Connection = 1
If oPop3.SSL_init() <> 0 Then
MsgBox "initialize ansslplus failed"
Exit Sub
End If
If oPop3.Connect( "pop3.email.com", "John", "John123" ) = 0 Then
MsgBox "Connected"
Else
MsgBox "Failed"
End If
End If
Sub SSL_stls_connect()
Dim oPop3 As New ANPOPLib.POPMAIN
oPop3.SSL_stls = 1
If oPop3.SSL_init() <> 0 Then
MsgBox "initialize ansslplus failed"
Exit Sub
End If
If oPop3.Connect( "pop3.email.com", "John", "John123" ) = 0 Then
MsgBox "Connected"
Else
MsgBox "Failed"
End If
End If
See Also
SSL_registerkey property
SSL_init Method
2001-2007 © Copyright AdminSystem Software Limited. All rights reserved.