AuthMethod Property


MailBee.IMAP4 object can establish connection with the IMAP4 server using various authentication types.

Default setting is a regular authentication. All IMAP4 servers support it, but it is insecure. During regular authentication user password is sent to server in plain form, so the password can be captured by hacker.

However, MailBee also supports secure authentication methods. All you need for using a secure connection is to set AuthMethod property value prior to connecting.

AuthMethod property must be set BEFORE calling Connect method, otherwise it will not take effect.

The following authentication method are allowed:

Note: Particular IMAP4 server might not support secure authentication types.


Value Type: Long
Parameters: None 

Usage example:

Dim Mailer
'Using visual basic to create object
Set Mailer = CreateObject("MailBee.IMAP4")
'Using ASP to create object
'Set Mailer = Server.CreateObject("MailBee.IMAP4")
'In ASP use Response.Write instead of MsgBox
Mailer.LicenseKey = "put your license key here"
Mailer.ServerName = "mailserver.com"
Mailer.UserName = "MyName"
Mailer.Password = "MyPassword"
Mailer.AuthMethod = 1 ' Using CRAM-MD5 secure authentication
Mailer.Connect
If Mailer.Connected Then
  MsgBox "Connected using CRAM-MD5 secure authentication"
  Mailer.Disconnect
End If

See Also:

Connect Method


Copyright 2002-2008, AfterLogic Corporation. All rights reserved.