mcallaghan
IS-IT--Management
I currently have a vbscript that has a attachement to it. What I am currently looking to do is be able to send a e-mail with the attachement in the body of the e-mail.
Example:
Lets say the the attachement sample.txt file just has the words test 123.
I want to be able to send the words test 123 which is in the sample.txt file into the body of the e-mail without going out and grabbing the attached file.
Dim OleMailMsg
Dim mDef_type
Dim mID
Dim mProj
Dim Def_type
Dim mAssigned
Dim session
Dim Asession
set out=WScript.CreateObject("Outlook.Application")
set mapi=out.GetNameSpace("MAPI")
set mail=out.CreateItem(0)
Set Asession =
'mail.Recipients.Add("test.com")
mail.Subject = "Checkin File Changes"
mail.Body = "Checkin Files that have been changed..."
////Dont want this line anymore
mail.Attachments.Add ("c:\file1.log")
I just want the contents of the file to be in my body
////////////////////////////////////////
mail.Send
Example:
Lets say the the attachement sample.txt file just has the words test 123.
I want to be able to send the words test 123 which is in the sample.txt file into the body of the e-mail without going out and grabbing the attached file.
Dim OleMailMsg
Dim mDef_type
Dim mID
Dim mProj
Dim Def_type
Dim mAssigned
Dim session
Dim Asession
set out=WScript.CreateObject("Outlook.Application")
set mapi=out.GetNameSpace("MAPI")
set mail=out.CreateItem(0)
Set Asession =
'mail.Recipients.Add("test.com")
mail.Subject = "Checkin File Changes"
mail.Body = "Checkin Files that have been changed..."
////Dont want this line anymore
mail.Attachments.Add ("c:\file1.log")
I just want the contents of the file to be in my body
////////////////////////////////////////
mail.Send