Solved How can i add include CC, BCC portion?

May 17, 2013 at 10:04:02
Specs: Windows 7
How can i add include CC, BCC portion in the below code .

SMTPServer = ""
Recipient = ""
From = ""
Subject = "Test email"
'attachment = "C:\Users\211364\Desktop\TWS\TWS jobs info.txt"

'If there is no attachment needed,Remove or comment above line.
'To comment the line,just add " ' " before the line.
'DO not modify anything below this line.

GenericSendmail SMTPserver, From, Recipient, Subject, Message

Sub GenericSendmail (SMTPserver, From, Recipient, Subject, Message)

set msg = WScript.CreateObject("CDO.Message")
msg.From = From
msg.To = Recipient
msg.Subject = Subject
msg.TextBody = Message
'msg.AddAttachment attachment
msg.Configuration.Fields ("") = SMTPServer
msg.Configuration.Fields("") = 2
End Sub

See More: How can i add include CC, BCC portion?

Report •

May 17, 2013 at 13:16:08
✔ Best Answer
msg.Bcc = ""
msg.Cc = ""

:: mike

Report •

May 28, 2013 at 10:54:32
Thanks Mike...

I have one more question.

I want to pass argument form the batch script to the above Message = "THE EMAIL SUBJECT"
I want to pass body of the mail from as argument from the batch file.
The requirement is it has to check for a file daily in the path . if the file is "Change file"
THe body of the mail should be like "Change file is submitted"
If the file is "Full file" avaible in the same path
The body of the mail should be like "Full file is submitted".

Im trying to capture this information by declaring variable and then passing this variable as argument to vbs script.
Please help me how could i handle this?

Report •
Related Solutions

Ask Question