How to add the "Remote Office, Computer Name, Domain name , Execution Time, Last Contact Time" information when using sendmail vbs script

How to add the "Remote Office, Computer Name, Domain name , Execution Time, Last Contact Time" information when using sendmail vbs script

Hi, I have a VBS script to deploy on more then 100 servers after a deployment.  My problem is i would like to have in the email that i got from them the following information in the script:

* Remote Office, Computer Name, Domain name , Execution Time, Last Contact Time

Any help will be appreciated

Thanks

  1. Const cdoSendUsingPickup = 1 'Send message using the local SMTP service pickup directory.
  2. Const cdoSendUsingPort = 2 'Send the message using the network (SMTP over the network).
  3. Const cdoAnonymous = 0 'Do not authenticate
  4. Const cdoBasic = 1 'basic (clear-text) authentication
  5. Const cdoNTLM = 2 'NTLM
  6. Set objMessage = CreateObject("CDO.Message")
  7. objMessage.Subject = "Example CDO Message"
  8. objMessage.From = """test "" <sender@domain.com>"
  9. objMessage.To = "recipient address"
  10. objMail.Recipients.Add("recipient address")
  11. objMessage.TextBody = "Deployement completed"
  12. '==This section provides the configuration information for the remote SMTP server.
  13. objMessage.Configuration.Fields.Item _
  14. ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
  15. 'Name or IP of Remote SMTP Server
  16. objMessage.Configuration.Fields.Item _
  17. ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.server.com"
  18. 'Type of authentication, NONE, Basic (Base64 encoded), NTLM
  19. objMessage.Configuration.Fields.Item _
  20. ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
  21. 'Your UserID on the SMTP server
  22. objMessage.Configuration.Fields.Item _
  23. ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "Deployement"
  24. 'Your password on the SMTP server
  25. objMessage.Configuration.Fields.Item _
  26. ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "Password"
  27. 'Server port (typically 25)
  28. objMessage.Configuration.Fields.Item _
  29. ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
  30. 'Use SSL for the connection (False or True)
  31. objMessage.Configuration.Fields.Item _
  32. ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False
  33. 'Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server)
  34. objMessage.Configuration.Fields.Item _
  35. ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
  36. objMessage.Configuration.Fields.Update
  37. '==End remote SMTP server configuration section==
  38. objMessage.Send








                New to ADManager Plus?

                  New to ADSelfService Plus?