Google GMail SMTP Sending Email (using VBScript

July 13, 2010

Google GMail SMTP Sending Email

Send an email using smtp.gmail.com

set mm = CreateObject("ChilkatMail2.ChilkatMailMan2")
mm.UnlockComponent "test"

'     SMTP server: smtp.gmail.com.
'     Port: 465.
'     Require SSL/STARTTLS: Yes.
'     Require SMTP authentication: Yes.
'     User name: your Gmail email address.
'     Password: your Gmail password. 

mm.SmtpHost = "smtp.gmail.com"
mm.SmtpPort = 465
mm.SmtpSsl = 1
mm.SmtpUsername = "****"
mm.SmtpPassword = "****"

set email = CreateObject("ChilkatMail2.ChilkatEmail2")
email.Subject = "test from Chilkat"
email.Body = "this is a test for our customer"
email.AddTo "Chilkat Support","support@chilkatsoft.com"
email.From = SmtpUsername

mm.SendEmail email

MsgBox mm.LastErrorText
mm.SaveLastError "error.txt"
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: