Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
adit91tea  
#1 Posted : Thursday, October 9, 2014 8:28:27 PM(UTC)
adit91tea

Rank: Newbie

Groups: Registered
Joined: 10/9/2014(UTC)
Posts: 0
Indonesia
Location: Karawang

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  
#2 Posted : Friday, October 10, 2014 5:11:09 AM(UTC)
ivan

Rank: Administration

Groups: Administrators
Joined: 11/11/2010(UTC)
Posts: 1,014

Thanks: 9 times
Was thanked: 41 time(s) in 41 post(s)
Hi, here is the example:

oSmtp.AddRecipient "CC Team", "cc@gmail.com", 1 'add cc
oSmtp.AddAttachment "d:\test.jpg"
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2019, Yet Another Forum.NET
This page was generated in 0.045 seconds.

EXPLORE TUTORIALS

© All Rights Reserved, AdminSystem Software Limited.