- Products
- Purchase
Order Online Maintenance Renewal Resellers - Support
Helpdesk Online Documentation Web Forum - Our Clients
- About
About us Services Contact
Back to Tutorials list
Back to Tutorials list
Upgrade Path
Enable logging
[MailBee Objects (VB6)]
pop.EnableLogging = True pop.LogFilePath = "C:\log.txt" pop.ClearLog
[MailBee.NET Objects (VB.NET)]
pop.Log.Enabled = True pop.Log.Filename = "C:\log.txt" pop.Log.Clear
Assign a license key
[MailBee Objects (VB6)]
Set pop = CreateObject("MailBee.POP3")
pop.LicenseKey = "put your license key here"
[MailBee.NET Objects (VB.NET)]
MailBee.Pop3Mail.Pop3.LicenseKey = "put your license key here"
Message
Add an attachment
[MailBee Objects (VB6)]
msg.AddAttachment "C:\archive.zip"
[MailBee.NET Objects (VB.NET)]
msg.Attachments.Add("C:\archive.zip")
Add a custom header
[MailBee Objects (VB6)]
msg.AddHeader "Organization", "MyCompany"
[MailBee.NET Objects (VB.NET)]
msg.Headers.Add("Organization", "MyCompany", False)
Encode header text using international characters
[MailBee Objects (VB6)]
msg.EncodeHeaderText "From", msg.FromAddr, "windows-1251", 3
[MailBee.NET Objects (VB.NET)]
msg.EncodeAllHeaders(Encoding.GetEncoding("windows-1251"), HeaderEncodingOptions.Base64)
Prepare HTML-formatted messages for displaying them locally, also saving embedded objects of the message into default or user-specified temporary location.
[MailBee Objects (VB6)]
msg.GetBodyWithEmbeddedObjects "C:\", "Temp"
[MailBee.NET Objects (VB.NET)]
msg.Parser.WorkingFolder = "C:\Temp\" msg.GetHtmlAndSaveRelatedFiles()
Get the friendly name from the specified full e-mail address
[MailBee Objects (VB6)]
msg.GetFriendlyName Msg.FromAddr
[MailBee.NET Objects (VB.NET)]
msg.From.DisplayName
Get value of specified message header
[MailBee Objects (VB6)]
msg.GetHeader "X-Mailer"
[MailBee.NET Objects (VB.NET)]
msg.Headers("X-Mailer")
Get html version of specified message
[MailBee Objects (VB6)]
strPlain = msg.GetHtmlFromPlain(msg.BodyText)
[MailBee.NET Objects (VB.NET)]
msg.Parser.PlainToHtmlMode = PlainToHtmlAutoConvert.IfNoHtml msg.Parser.PlainToHtmlOptions = PlainToHtmlConvertOptions.UriToLink strHtml = msg.BodyHtmlText
Get plain-text version of specified message
[MailBee Objects (VB6)]
strHtml = msg.GetPlainFromHtml(msg.BodyText)
[MailBee.NET Objects (VB.NET)]
msg.Parser.HtmlToPlainMode = HtmlToPlainAutoConvert.IfNoPlain msg.Parser.PlainToHtmlOptions = PlainToHtmlConvertOptions.UriToLink strPlain = msg.BodyPlainText
Get the pure e-mail address
[MailBee Objects (VB6)]
msg.GetPureAddr msg.FromAddr
[MailBee.NET Objects (VB.NET)]
msg.From.Email
Load body of a message from the disk file that is in your HDD drive that is in your computer
[MailBee Objects (VB6)]
msg.ImportBodyText "C:\web_page.htm", True
[MailBee.NET Objects (VB.NET)]
msg.LoadBodyText("C:\web_page.htm", MessageBodyType.Html)
Load and parse an e-mail message from the disk file that is in your HDD drive that is in your computer
[MailBee Objects (VB6)]
msg.ImportFromFile "C:\message.eml"
[MailBee.NET Objects (VB.NET)]
msg.LoadMessage ("C:\message.eml")
Remove custom header from the message
[MailBee Objects (VB6)]
msg.RemoveHeader "X-Priority"
[MailBee.NET Objects (VB.NET)]
msg.Headers.Remove("X-Priority")
Save message content to the file
[MailBee Objects (VB6)]
msg.SaveMessage "C:\msg.eml"
[MailBee.NET Objects (VB.NET)]
msg.SaveMessage("C:\msg.eml")
Test whether specified email address is correct
[MailBee Objects (VB6)]
msg.ToAddr = "jdoe@domain.com" msg.ValidateEmailAddress msg.ToAddr, 1
[MailBee.NET Objects (VB.NET)]
mailer.To.AddFromString("joe@mysite.com")
mailer.TestSend(SendFailureThreshold.AllRecipientsFailed)
Write content of the attachment (value of Content property) to the scecified folder
[MailBee Objects (VB6)]
attach.SaveFile "C:\Data Files"
[MailBee.NET Objects (VB.NET)]
attach.SaveToFolder("C:\Data Files\", true)
Get the binary content of the attachment as a string
[MailBee Objects (VB6)]
attach.Content
[MailBee.NET Objects (VB.NET)]
attach.GetData()
Remove the attachment with the specified index from the collection
[MailBee Objects (VB6)]
msg.Attachments.Remove 1
[MailBee.NET Objects (VB.NET)]
msg.Attachments.RemoveAt(1)
SMTP
Set SMTP server address and specify account credentials
[MailBee Objects (VB6)]
mailer.ServerName = "mail.domain.com" mailer.UserName = "jdoe" mailer.Password = "secret"
[MailBee.NET Objects (VB.NET)]
mailer.SmtpServers.Add("mail.domain.com", "jdoe", "secret")
Compose the message and extract the name of the SMTP server to be used to sent the message
[MailBee Objects (VB6)]
mailer.FromAddr = "bill@domain.com"
mailer.ToAddr = "jdoe@domain.com"
mailer.Subject = "Hello"
mailer.BodyText = "Simple message"
mailer.ServerName = objSMTP.GetRelayServerFromEmailAddress("jdoe@domain.com")
mailer.Send
[MailBee.NET Objects (VB.NET)]
MailBee.SmtpMail.Smtp.QuickSend("joe@me.com", "bill@you.com", "Hello", "Simple message")
Relay (forward) previously saved message to one or more recipients
[MailBee Objects (VB6)]
mailer.RelayMessage "C:\msg.eml", "jdoe@domain.com", "bill@domain.com, jane@domain.com"
[MailBee.NET Objects (VB.NET)]
mailer.RelayFromEmlFile("C:\msg.eml", "jdoe@domain.com", "bill@domain.com, jane@domain.com")
Destroy contained Message object and create new one
[MailBee Objects (VB6)]
mailer.ResetMessage
[MailBee.NET Objects (VB.NET)]
msg.Reset()
Send the message to SMTP server. In addition to standard sending functionality, allow sending messages from fake addresses
[MailBee Objects (VB6)]
mailer.SendEx "jdoe@domain.com", "bill@domain.com"
[MailBee.NET Objects (VB.NET)]
mailer.Send("jdoe@domain.com", "bill@domain.com")
Submit the message to the queue for delivery
[MailBee Objects (VB6)]
mailer.SendToQueue "C:\Inetpub\mailroot\Pickup"
[MailBee.NET Objects (VB.NET)]
mailer.SubmitToPickupFolder("C:\Inetpub\mailroot\Pickup")
Specify the authentication method
[MailBee Objects (VB6)]
mailer.ServerName = "mail.domain.com" mailer.AuthMethod = 3 mailer.UserName = "jdoe" mailer.Password = "secret"
[MailBee.NET Objects (VB.NET)]
mailer.SmtpServers.Add("mail.domain.com", "jdoe", "secret", AuthenticationMethods.SaslCramMD5)
Connect using secure SSL/TLS connections
[MailBee Objects (VB6)]
Set mailer = CreateObject("MailBee.SMTP")
Set SSL = CreateObject("MailBee.SSL")
Set mailer.SSL = SSL
mailer.PortNumber = 465
mailer.ServerName = "mail.domain.com"
mailer.UserName = "jdoe"
mailer.Password = "secret"
mailer.Connect
[MailBee.NET Objects (VB.NET)]
Dim mailer As New Smtp
Dim server As SmtpServer = New SmtpServer("mail.domain.com", "jdoe", "secret")
server.Port = 465
server.SslMode = SslStartupMode.OnConnect
mailer.SmtpServers.Add(server)
POP3
Connect and log into POP3 mail account
[MailBee Objects (VB6)]
pop.Connect "mailserver.com", 110, "jdoe", "secret"
[MailBee.NET Objects (VB.NET)]
pop.Connect("mail.domain.com", 110)
pop.Login("jdoe", "secret")
Mark specified message for deletion
[MailBee Objects (VB6)]
pop.DeleteMessage 1
[MailBee.NET Objects (VB.NET)]
pop.DeleteMessage(1)
Get the ordinal position of a message given its Unique-ID
[MailBee Objects (VB6)]
pop.GetMessageNumberFromUID(strUID)
[MailBee.NET Objects (VB.NET)]
pop.GetMessageIndexFromUid(strUID)
Get UID value for a message
[MailBee Objects (VB6)]
pop.GetMessageUID(1)
[MailBee.NET Objects (VB.NET)]
pop.GetMessageUidFromIndex(1)
Send "noop" command to POP3 server
[MailBee Objects (VB6)]
pop.Ping
[MailBee.NET Objects (VB.NET)]
pop.Noop()
Retrieve headers for all messages from the e-mail account
[MailBee Objects (VB6)]
Set msgs = pop.RetrieveHeaders
[MailBee.NET Objects (VB.NET)]
Dim msgs As MailMessageCollection msgs = pop.DownloadMessageHeaders()
Retrieve headers for all messages from the e-mail account and partialy download some message body lines
[MailBee Objects (VB6)]
Set msgs = pop.RetrieveHeaders(10)
[MailBee.NET Objects (VB.NET)]
Dim msgs As MailMessageCollection msgs = pop.DownloadMessageHeaders(1, -1, 10)
Retrieve all messages from the e-mail account
[MailBee Objects (VB6)]
Set msgs = Mailer.RetrieveMessages
[MailBee.NET Objects (VB.NET)]
Dim msgs As MailMessageCollection msgs = pop.DownloadEntireMessages()
Retrieve a message from the e-mail account
[MailBee Objects (VB6)]
Set msg = pop.RetrieveSingleMessage(1)
[MailBee.NET Objects (VB.NET)]
Dim msg As MailMessage msg = pop.DownloadEntireMessage(1)
Retrieve headers for a particular message from the e-mail account
[MailBee Objects (VB6)]
Set msg = pop.RetrieveSingleMessageHeaders(1)
[MailBee.NET Objects (VB.NET)]
Dim msg As MailMessage msg = pop.DownloadMessageHeader(1)
Retrieve UIDs of all messages in currently opened mailbox
[MailBee Objects (VB6)]
Dim uids uids = pop.Search
[MailBee.NET Objects (VB.NET)]
Dim uids As String() = pop.GetMessageUids()
Send user-defined text to POP3 server
[MailBee Objects (VB6)]
pop.SendCommand "rset" & vbCrLf
[MailBee.NET Objects (VB.NET)]
pop.ExecuteCustomCommand("rset" & vbCrLf, False)
Get total number of the messages in the currently opened mailbox
[MailBee Objects (VB6)]
pop.MessageCount
[MailBee.NET Objects (VB.NET)]
pop.InboxMessageCount
Establish connection with the POP3 server using various authentication types
[MailBee Objects (VB6)]
Mailer.ServerName = "mail.domain.com" Mailer.UserName = "jdoe" Mailer.Password = "secret" Mailer.AuthMethod = 1 Mailer.Connect
[MailBee.NET Objects (VB.NET)]
pop.Connect("mail.domain.com")
pop.Login("jdoe", "secret", AuthenticationMethods.Apop)
Know whether POP3 object is performing long-run operation
[MailBee Objects (VB6)]
pop.Busy
[MailBee.NET Objects (VB.NET)]
pop.IsBusy
Get completion status of the last operation
[MailBee Objects (VB6)]
pop.ErrCode
[MailBee.NET Objects (VB.NET)]
pop.LastResult
Get size of particular message in e-mail account
[MailBee Objects (VB6)]
pop.Size 1
[MailBee.NET Objects (VB.NET)]
pop.GetMessageSize(1)
Get last reply of POP3 server
[MailBee Objects (VB6)]
pop.ServerResponse
[MailBee.NET Objects (VB.NET)]
pop.GetServerResponse()
Get total size of all messages in currently opened mailbox
[MailBee Objects (VB6)]
pop.TotalSize
[MailBee.NET Objects (VB.NET)]
pop.InboxSize
Connect using secure SSL/TLS connections
[MailBee Objects (VB6)]
Set pop = CreateObject("MailBee.POP3")
Set SSL = CreateObject("MailBee.SSL")
Set pop.SSL = SSL
pop.PortNumber = 995
pop.ServerName = "mail.domain.com"
pop.UserName = "jdoe"
pop.Pasword = "secret"
pop.Connect
[MailBee.NET Objects (VB.NET)]
Dim pop As New Pop3()
pop.SslProtocol = SecurityProtocol.Auto
pop.SslMode = SslStartupMode.OnConnect
pop.Connect("mail.domain.com", 995)
pop.Login("jdoe", "secret")
IMAP
Upload a message to the specified mailbox on the server
[MailBee Objects (VB6)]
imp.AppendMessage "Draft", msg.RawBody
[MailBee.NET Objects (VB.NET)]
imp.UploadMessage(msg, "Draft")
Connect to the IMAP4 server and log in specified user account
[MailBee Objects (VB6)]
imp.Connect "mail.domain.com", 143, "jdoe", "secret"
[MailBee.NET Objects (VB.NET)]
imp.Connect("mail.domain.com", 143)
imp.Login("jdoe", "secret")
Create a mailbox on the IMAP4 server
[MailBee Objects (VB6)]
imp.CreateMailbox "Archive"
[MailBee.NET Objects (VB.NET)]
imp.CreateFolder("Archive")
Delete existing mailbox from the IMAP4 server
[MailBee Objects (VB6)]
imp.DeleteMailbox "Archive"
[MailBee.NET Objects (VB.NET)]
imp.DeleteFolder("Archive")
Select the specified folder for read-only access
[MailBee Objects (VB6)]
imp.ExamineMailbox "Inbox"
[MailBee.NET Objects (VB.NET)]
imp.ExamineFolder("Inbox")
Send "noop" command to IMAP4 server
[MailBee Objects (VB6)]
imp.Ping
[MailBee.NET Objects (VB.NET)]
imp.Noop()
Rename existing mailbox on the IMAP4 server
[MailBee Objects (VB6)]
imp.RenameMailbox "Archive", "Backup"
[MailBee.NET Objects (VB.NET)]
imp.RenameFolder("Archive", "Backup")
Retrieve one or more message envelopes from currently selected IMAP4 mailbox
[MailBee Objects (VB6)]
Set Envelopes = imp.RetrieveEnvelopes(1, 10, False)
[MailBee.NET Objects (VB.NET)]
Dim envs As EnvelopeCollection = imp.DownloadEnvelopes("1:10", false)
Retrieve Mailboxes collection which contains all mailboxes in the IMAP4 account
[MailBee Objects (VB6)]
Set Mailboxes = imp.RetrieveMailboxes
[MailBee.NET Objects (VB.NET)]
Dim folders As FolderCollection = imp.DownloadFolders()
Retrieve a message from currently selected IMAP4 mailbox
[MailBee Objects (VB6)]
Set msg = imp.RetrieveSingleMessage (1, False)
[MailBee.NET Objects (VB.NET)]
Dim msg As MailMessage = imp.DownloadEntireMessage(1, False)
Retrieve message headers from currently selected IMAP4 mailbox
[MailBee Objects (VB6)]
Set Message = Mailer.RetrieveSingleMessageHeaders(1, False)
[MailBee.NET Objects (VB.NET)]
Dim msgs As MailMessageCollection = imp.DownloadMessageHeaders("1:1", False)
Retrieve the total size (in bytes) of all messages in the currently selected IMAP4 mailbox
[MailBee Objects (VB6)]
imp.RetrieveTotalSize
[MailBee.NET Objects (VB.NET)]
imp.GetFolderSize()
Search the currently selected mailbox for messages which meet specified condition
[MailBee Objects (VB6)]
imp.Search(False, "RECENT")
[MailBee.NET Objects (VB.NET)]
imp.Search(False, "RECENT", System.Text.Encoding.Default.WebName)
Select specified mailbox on the IMAP4 server
[MailBee Objects (VB6)]
imp.SelectMailbox "Inbox"
[MailBee.NET Objects (VB.NET)]
imp.SelectFolder("Inbox")
Execute user-supplied command on the IMAP4 server
[MailBee Objects (VB6)]
imp.SendCommand "DONE"
[MailBee.NET Objects (VB.NET)]
imp.ExecuteCustomCommand("DONE", Nothing)
Set the flags for a message in the currently selected mailbox
[MailBee Objects (VB6)]
imp.SetFlagsForMessage 1, False, 2, 2
[MailBee.NET Objects (VB.NET)]
imp.SetMessageFlags(1, False, SystemMessageFlags.Deleted, MessageFlagAction.Remove)
Subscribe specified mailbox
[MailBee Objects (VB6)]
imp.Subscribe "Archive"
[MailBee.NET Objects (VB.NET)]
imp.SubscribeFolder("Archive")
Unsubscribe specified mailbox
[MailBee Objects (VB6)]
imp.Unsubscribe "Archive"
[MailBee.NET Objects (VB.NET)]
imp.UnsubscribeFolder("Archive")
Establish connection with the IMAP4 server using various authentication types
[MailBee Objects (VB6)]
imp.ServerName = "mail.domain.com" imp.UserName = "jdoe" imp.Password = "secret" imp.AuthMethod = 1 imp.Connect
[MailBee.NET Objects (VB.NET)]
imp.Connect("mail.domain.com")
imp.Login("jdoe", "secret", AuthenticationMethods.Apop)
Know whether IMAP4 object is performing long-run operation
[MailBee Objects (VB6)]
imp.Busy
[MailBee.NET Objects (VB.NET)]
imp.IsBusy
Get completion status of the last operation
[MailBee Objects (VB6)]
imp.ErrCode
[MailBee.NET Objects (VB.NET)]
imp.LastResult
Get last reply of IMAP4 server
[MailBee Objects (VB6)]
imp.ServerResponse
[MailBee.NET Objects (VB.NET)]
imp.GetServerResponse()
Connect using secure SSL/TLS connections
[MailBee Objects (VB6)]
Set imp = CreateObject("MailBee.IMAP4")
Set SSL = CreateObject("MailBee.SSL")
Set imp.SSL = SSL
imp.PortNumber = 995
imp.ServerName = "mail.domain.com"
imp.UserName = "jdoe"
imp.Password = "secret"
imp.Connect
[MailBee.NET Objects (VB.NET)]
Dim imp As New Imap()
imp.SslProtocol = SecurityProtocol.Auto
imp.SslMode = SslStartupMode.OnConnect
imp.Connect("mail.domain.com", 995)
imp.Login("jdoe", "secret")