Here you go (untested)..
code:
$objNetwork = WScript.CreateObject("WScript.Network")
$UserName = $objNetwork.UserName
$CompName = $objNetwork.Computername
$objEmail = CreateObject("CDO.Message")
$objEmail.From = "scripterror@mydomain.com"
$objEmail.To = "myname@mydomain.com"
$objEmail.Subject = "subject"
$objEmail.Textbody = "The User: " + $UserName + " on Worksation: " + $CompName + " could not get to subject"
$objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
$objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.mydomain.com"
$objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
$objEmail.Configuration.Fields.Update
$objEmail.Send
HTH,
Kent