How can I send e-mail through Gmail with ActiveX version (VB6, classic ASP)

MailBee Objects MailBee Objects MailBee Objects COM/ActiveX COM/ActiveX COM/ActiveX SMTP SMTP SMTP SSL SSL SSL Gmail Gmail Gmail connection connection connection send mail send mail send mail
Gmail accepts only secure SSL connections, and thus you should use MailBee SMTP component with MailBee SSL/SMIME component.

Visual Basic 6 / VBScript:
Set SMTP = CreateObject("MailBee.SMTP")
set SSL = CreateObject("MailBee.SSL")

SMTP.LicenseKey = "Your SMTP key"
SSL.LicenseKey = "Your SSL key"

Set SMTP.SSL = SSL

SMTP.UserName = "gmail-login"
SMTP.Password = "gmail-password"
SMTP.AuthMethod = 2

SMTP.ServerName = "smtp.gmail.com"

SSL.UseStartTLS = True

SMTP.FromAddr = "user@gmail.com"
SMTP.ToAddr = "joe@company.com"
SMTP.Subject = "Report"

If Not SMTP.Send Then MsgBox SMTP.ErrDesc


Classic ASP:
Set SMTP = Server.CreateObject("MailBee.SMTP")
set SSL = Server.CreateObject("MailBee.SSL")

SMTP.LicenseKey = "Your SMTP key"
SSL.LicenseKey = "Your SSL key"

Set SMTP.SSL = SSL

SMTP.UserName = "gmail-login"
SMTP.Password = "gmail-password"
SMTP.AuthMethod = 2

SMTP.ServerName = "smtp.gmail.com"

SSL.UseStartTLS = True

SMTP.FromAddr = "user@gmail.com"
SMTP.ToAddr = "joe@company.com"
SMTP.Subject = "Report"

If Not SMTP.Send Then Response.Write SMTP.ErrDesc
Back to articles list