Knowledge Base

Can MailBee SMTP (ActiveX) send messages through Hotmail.com/Live.com?

Live.com allows using SSL connections only. You should make sure you can check mail via Outlook Express or Mozilla Thunderbird and then apply the same settings to MailBee. The following link describes SSL and other settings for Live.com:

http://windowslivehelp.com/solutions/settings/archive/2009/01/06/send-and-receive-windows-live-hotmail-emails-from-a-mail-client.aspx

To learn how to enable SSL in MailBee ActiveX, see SMTP.SSL property documentation.

Please pay your attention to SSL.UseStartTLS property:

- set SSL.UseStartTLS to false when you need to establish SSL connection over dedicated SMTP port (465);

- set SSL.UseStartTLS to true when you need to establish SSL connection over regular SMTP port (25 or 587).

The following sample code allows sending mail via Live.com SMTP service:

Dim Mailer, SSL
Set Mailer = CreateObject("MailBee.SMTP")
Set SSL = CreateObject("MailBee.SSL")

Mailer.EnableLogging = True
Mailer.LogFilePath = "D:\test\live_smtp.txt"
Mailer.ClearLog

Mailer.LicenseKey = "trial or permanent license key"
SSL.LicenseKey = "trial or permanent license key"
Set Mailer.SSL = SSL
Mailer.SSL.UseStartTLS = True
Mailer.ServerName = "smtp.live.com"
Mailer.PortNumber = 587
Mailer.Message.ToAddr = "recipient@domain.com"
Mailer.AuthMethod = 2
Mailer.UserName = "email@live.com"
Mailer.Password = "password"
Mailer.Message.FromAddr = "email@live.com"
Mailer.Message.Subject = "Hello"
Mailer.Message.BodyText = "TestMessage"

If Mailer.Send Then
  MsgBox "Sent successfully"
Else
  MsgBox "Error #" & Mailer.ErrCode & ", " & Mailer.ErrDesc
End If