adit91tea
  • adit91tea
  • 50.25% (Neutral)
  • Newbie Topic Starter
10 years ago
Please advise syntax for add attachment and CC (email recipient) on vbscript

following is my program :
=============================================
Dim oSmtp
Set oSmtp = CreateObject("EASendMailObj.Mail")

oSmtp.LicenseCode = "TryIt"

oSmtp.ServerAddr = "smtp.gmail.com"

' Set User Authentication
oSmtp.UserName = "xxx@gmail.com"
oSmtp.Password = "xxx"

' Enable TLS Connection
oSmtp.SSL_init
oSmtp.SSL_starttls = 1
oSmtp.Subject = "test for ssl"
oSmtp.BodyText = "test body"

oSmtp.FromAddr = "xxx@gmail.com"

oSmtp.AddRecipient "Support Team", "xxx@gmail.com", 0


If oSmtp.SendMail() = 0 Then
msgbox "Message delivered"
Else
msgbox oSmtp.GetLastErrDescription()
End If
oSmtp.SSL_uninit
ivan
  • ivan
  • 100% (Exalted)
  • Administration
10 years ago
Hi, here is the example:

oSmtp.AddRecipient "CC Team", "cc@gmail.com", 1 'add cc
oSmtp.AddAttachment "d:\test.jpg"

EXPLORE TUTORIALS

© All Rights Reserved, AIFEI Software Limited & AdminSystem Software Limited.