- Products
- Purchase
Order Online Maintenance Renewal Resellers - Support
Helpdesk Online Documentation Web Forum - Our Clients
- About
About us Services Contact
MailBee Objects
- Where can I download MailBee Objects updates and update my current installation?
- My installation of MailBee Objects seems to be broken. How can I repair it?
- I'm getting 'CreateObject Failed' (or 'Server.CreateObject failed') error. What's wrong?
- Can I use MailBee Objects on a shared hosting?
- I'm going to distribute my application powered by MailBee Objects. Which files should I include in my package?
- How to add MailBee Objects in VB.NET project?
- (POP3) How to retrieve headers for all messages and iterate through a collection in ASP?
- (POP3) I need to get somewhat more than just message headers (but still not a whole message). Is it possible to get headers and first lines of message body at once?
- (SMTP) How to turn line-wrapping off when composing plain-text body.
- (POP3) Some characters are displayed as "???". How to prevent this?
- (SMTP) Messages are not sent. Any solution?
- 64-bit version of MailBee.dll
- Using MailBee with MS Exchange Server (for developers how previously worked with Outlook)
1. Where can I download MailBee Objects updates and update my current installation?
The latest production version of MailBee Objects is available at:
http://www.afterlogic.com/download/MailBee.exe
The latest beta version of 32-bit MailBee.dll is available at:
http://www.afterlogic.com/updates/mailbee.zip
The latest beta version of 64-bit MailBee64.dll is available at:
http://www.afterlogic.com/updates/mailbee64.zip
To reinstall MailBee Objects or install a new version, it's required to uninstall the existing version first.
Prior to uninstalling make sure no applications use MailBee Objects. For example, Internet Information Server (IIS) caches recently used components, so you need to stop or restart the server BEFORE uninstalling MailBee Objects (execute "iisreset" command in Start/Run menu).
Also, ActiveX-aware development environments (such as Developer Studio) might lock MailBee Objects if you develop an application or ASP page which uses MailBee Objects. You need to close your development environment before uninstalling.
The easiest way to make sure MailBee Objects DLL is not locked by some other application is to reboot the machine where MailBee Objects is installed. Of course, after rebooting you must launch MailBee uninstaller before using IIS or Developer Studio (otherwise, MailBee Objects might be locked again).
As soon as MailBee Objects is not locked anymore, you can uninstall it and install the new version.
2. My installation of MailBee Objects seems to be broken. How can I repair it?
Please refer to Where can I download MailBee Objects updates and update my current installation? topic.
3. I'm getting 'CreateObject Failed' (or 'Server.CreateObject failed') error. What's wrong?
Most likely, your application powered by MailBee Objects doesn't have sufficient permissions to MailBee.dll or MailBee Objects installation was damaged for some reason. If your application is an ASP application, please refer to the following topics to learn how to resolve this problem:
- I'm getting "Server object error 'ASP 0177' Server.CreateObject failed". Why?
- I'm getting "Server object error 'ASP 0178' Server.CreateObject failed while checking permissions. Access is denied to this object". What's wrong?
For ASP.NET application powered by MailBee Objects:
If you're sure all permissions set correctly, MailBee Objects installation was damaged for some reason. Stop or exit all applications which can potentially use MailBee Objects (such as IIS or Developer Studio), uninstall MailBee Objects and install it again.
4. Can I use MailBee Objects on a shared hosting?
Yes, but you should ask your hosting provider to register it on the server. Similarly to any other ActiveX, it can be registered via standard system regsvr32 utility. Example:
regsvr32 "C:\Program Files\MailBee\MailBee.dll"
5. I'm going to distribute my application powered by MailBee Objects. Which files should I include in my package?
MailBee.dll ActiveX component is an only file required to distribute MailBee Objects across computer systems. Copy it to any location (for example, windows system32 directory or your application directory) and register it as ActiveX component in the registry (for example, using regsvr32 utility or other tool your installer program provides).
If you're using 64-bit version, the same instructions apply with the only difference that the file to be distributed is MailBee64.dll.
6. How to add MailBee Objects in VB.NET project?
For .NET environment, we recommend to use MailBee.NET Objects instead of MailBee Objects. To learn how to add MailBee.NET Objects into your VB.NET project, please refer to "How to add MailBee.NET Objects in my .NET-based project?" topic.
However, if you need to add MailBee Objects into your VB.NET project for some reason, you should go to "Project" menu, then "Add reference", select "COM" tab and then search for "MailBee Objects type library" in the list.
Note that MailBee is not a visual control, you cannot place it on the form; instead, you should create instances of MailBee classes programmatically in the code.
7. (POP3) How to retrieve headers for all messages and iterate through a collection in ASP?
To retrieve only headers (without downloading whole messages) at once, use RetrieveHeaders method that returns collection of Message objects:
' Assume Mailer object is already created and all required settings
' (LicenseKey/UserName/Password/ServerName) are set.
If Mailer.Connect Then
Set Msgs = Mailer.RetrieveHeaders
Response.Write Msgs.Count & " messages total in mailbox<br>"
For Each Msg In Msgs
Response.Write "Subject: " & Msg.Subject & "<br>"
Next
Mailer.Disconnect
Else
Response.Write Mailer.ErrDesc
End If
8. (POP3) I need to get somewhat more than just message headers (but still not a whole message). Is it possible to get headers and first lines of message body at once?
RetrieveHeaders along with RetrieveSingleMessageHeaders methods have optional parameter BodyLinesCount that allows you to specify how many body lines to download in addition to headers part.
Dim Mailer, Msg
'Using visual basic to create object
Set Mailer = CreateObject("MailBee.POP3")
'Using ASP to create object
'Set Mailer = Server.CreateObject("MailBee.POP3")
'In ASP use Response.Write instead of MsgBox
Mailer.LicenseKey = "put your license key here"
Mailer.Connect "mailserver.com", 110, "MyName", "MyPassword"
If Mailer.Connected Then
If Mailer.MessageCount > 0 Then
' Download headers and 10 lines of the body
Set Msg = Mailer.RetrieveSingleMessageHeaders(1, 10)
If Not Msg Is Nothing Then
MsgBox "Body preview: " & Msg.BodyText
End If
End If
Mailer.Disconnect
End If
9. (SMTP) How to turn line-wrapping off when composing plain-text body.
Use quoted-printable (QP) or base64 (B64) body encoding methods. These advanced methods preserve original text formatting - text is no longer wrapped by 76 characters per line. See BodyEncoding and AltBodyEncoding topics or the sample code below for details.
Dim Mailer
'Using visual basic to create object
Set Mailer = CreateObject("MailBee.SMTP")
'Using ASP to create object
'Set Mailer = Server.CreateObject("MailBee.SMTP")
'In ASP use Response.Write instead of MsgBox
Mailer.LicenseKey = "put your license key here"
Mailer.ServerName = "mail.server.com"
If Mailer.Connect Then
Mailer.Message.ToAddr = "bill@yoursite.com"
Mailer.Message.FromAddr = "joe@mysite.com"
Mailer.Message.Subject = "Hello"
Mailer.Message.BodyText = "Assume the text at this line is longer that 76 symbols length"
Mailer.Message.BodyEncoding = 2 ' Quoted-printable encoding
Mailer.Send
Mailer.Disconnect
End If
10. (POP3) Some characters are displayed as "???". How to prevent this?
You should set POP3.CodepageMode=1 prior to retrieving messages. This will activate an alternate method of charset conversions.
Dim Mailer, Msg 'Using visual basic to create object Set Mailer = CreateObject("MailBee.POP3") 'Using ASP to create object 'Set Mailer = Server.CreateObject("MailBee.POP3") 'In ASP use Response.Write instead of MsgBox Mailer.LicenseKey = "put your license key here" Mailer.Connect "mailserver.com", 110, "MyName", "MyPassword" If Mailer.Connected Then If Mailer.MessageCount > 0 Then ' Now MailBee will convert the body ' into Windows version of the message's codepage ' instead of converting into current system's Windows codepage. Mailer.CodepageMode = 1 Set Msg = Mailer.RetrieveSingleMessage(1) If Not Msg Is Nothing Then MsgBox Msg.BodyText End If End If Mailer.Disconnect End If
When POP3.CodepageMode=0, MailBee Objects converts messages from their original codepages to default server codepage and this may cause non-latin characters loss. POP3.CodepageMode=1 forces MailBee Objects to convert messages from their original codepages to their Windows counterparts.
11. (SMTP) Messages are not sent. Any solution?
SMTP server you are using:
- might be down
- requires users' authentication (see SMTP.AuthMethod property on how to use SMTP authentication)
- does not allow sending from the e-mail address you have specified in FromAddr field
- antispam software running on the server or on your machine (or within your local network) blocks e-mail transmissions for some reason. Try to disable this software or switch to another SMTP server (if this software operates on the server)
- the message size exceeded allowable limit. Many servers do not allow relaying large e-mails
- the server may allow user access from restricted set of IP addresses only. This is common for ISP's servers where you may access mail server from your computer but not from remote computer (such as web server where webmail system powered by MailBee is running)
- Server requires specific domain to be used in HELO command. Set SMTP.Domain or SMTP.Message.FromAddr property BEFORE calling SMTP.Connect method to use proper domain
MailBee.SMTP object supports a number of debugging properties and logging option to help you in understanding what really happens. Also, you may send the log file to us to find the solution quickly.
Debugging properties are:
- IsError - whether an error occurred
- ErrDesc - short text description of an error
- ErrCode - numeric code of an error
- ServerResponse - last text reply of the server
Logging may be activated by enabling logging option and specifying log file path (see EnableLogging and LogFilePath properties).
Sample code below shows how to activate logging and check debugging properties on error:
Dim Mailer
'Using visual basic to create object
Set Mailer = CreateObject("MailBee.SMTP")
'Using ASP to create object
'Set Mailer = Server.CreateObject("MailBee.SMTP")
'In ASP use Response.Write instead of MsgBox
' Enable logging option
Mailer.EnableLogging = True
Mailer.LogFilePath = "C:\smtp_log.txt" ' You may send this log to us
' Uncomment the next line if you want the log file to be cleared first
' Mailer.ClearLog
Mailer.LicenseKey = "put your license key here"
Mailer.ServerName = "mail.site.com"
If Mailer.Connect Then
Mailer.Message.ToAddr = "recipient@server.com"
Mailer.Message.FromAddr = "sender@server.com"
Mailer.Message.Subject = "Test"
Mailer.Message.BodyText = "Body test"
If Not Mailer.Send Then
MsgBox _
Mailer.ErrDesc & vbCrLf & _
"ErrCode: " & Mailer.ErrCode & vbCrLf & _
"Last server reply: " & Mailer.ServerResponse
End If
Mailer.Disconnect
Else
MsgBox _
Mailer.ErrDesc & vbCrLf & _
"ErrCode: " & Mailer.ErrCode & vbCrLf & _
"Last server reply: " & Mailer.ServerResponse
End If
12. 64-bit version of MailBee.dll
64-bit version of MailBee.dll (MailBee64.dll) is installed in the same folder where MailBee.dll resides. If your system is 64-bit, MailBee64.dll also gets registered (so that both 32-bit and 64-bit versions are registered side-by-side). If you need to register it on 64-bit Windows manually (for instance, when deploying your application), use regsvr32 utility in Windows\System32 folder. Note: there is another version of regsvr32 in Windows\SysWOW64 folder, do not use it!
You must run regsvr32 in "Run as Administrator" mode (for instance, when opening Command Prompt, use "Run as Administrator" option).
Example: C:\Windows\System32\regsvr32 "C:\Program Files (x86)\MailBee Objects\MailBee64.dll"
13. Using MailBee with MS Exchange Server (for developers how previously worked with Outlook)
Outlook usually works with MS Exchange over ExchangeRPC protocol, not over SMTP, POP3 or IMAP. Thus, the fact you can successfully connect with MS Outlook does not yet mean the same settings will apply in SMTP, POP3 or IMAP case.
If you have connectivity issues, make sure SMTP, POP3 or IMAP port is opened on both the server and your computer. Also, make sure MS Exchange is running SMTP and POP3 or IMAP service and the user you're trying to authenticate has permissions to use SMTP, POP3, or IMAP (depending on which protocol you're using).
By default, POP3 and IMAP access is DISABLED on MS Exchange server.
Using logging (see EnableLogging property of your mailer object) can be helpful for troubleshooting (for instance, to find out whether the problem occurs during connecting or during authenticating).
If the connection itself succeeds but you cannot log in, try using NTLM or GSSAPI authentication (see AuthMethod of the mailer component for details) because MS Exchange may disable other methods. Or, try setting Mailer.SSL.Enabled=True (where Mailer is your SMTP, POP3 or IMAP4 object). MS Exchange may be configured to allow you to authenticate only if the connection is secured.
The username you're using for authentication may be incorrect due to the domain part. With GSSAPI or NTLM authentication, you can specify the domain with UserDomain property. With regular authentication, you have to supply it in the UserName. The typical syntax is "domain\username".
If your Exchange account is aliased, the full form of the login name can be "domain\logon_name\alias_name".