here's some code for 2000/xp. vista hasn't been tested.
you need to change the smtp server and email addresses
it's vbscript.
Code:
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "from@email.com"
objEmail.To = "to@email.com"
objEmail.Subject = "subject text"
ax = createObject("WScript.Network");
txt = "Username: ")
txt = txt & ax.UserName & "<br />"
txt = txt & "Computer Name: "
txt = txt & ax.ComputerName & '<br />"
txt = txt & "Domain Name: "
txt = txt & ax.UserDomain & '<br />"
objEmail.htmlbody = txt
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
"smtp.server.com"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
'for each i in list
'msgbox i
'objEmail.AddAttachment i
'next
'objEmail.AddAttachment wshshell.currentdirectory & "\" & logf
objEmail.Send
'msgbox "sent."