I am trying to send an emai from a vbs script. Everything works fine, except for the attachment, as it turns out I can't do:
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = subj
objMessage.To = ToAdd
objMessage.From = FromAddress
objMessage.TextBody = now() & VbCrLf & BodyText
objMessage.AddAttachment = folder & NewFileName & "." & FileExt
Apparently I need to specify an exact location for my file, which isn't ideal as I intend to use the script on different servers, and the filename will change every day. Is there a better way to send an email in vbs as I can't seem to find much information apart from using CDO.
- Edited by iGGt Tuesday, September 07, 2010 3:28 PM correction