Some users find it too much of a task to send an email to report problems, I would like to put a vbs script on staff laptops that does the following:-
1) sends an email to only 1 email address via an smtp server
2) the "body" of the email should include what a usertypes in a input box.
I have seen examples on the web to send emails how i want ( script below) but do not know how to get the "userinput" to include in the bosy of the email ....
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Example CDO Message"
objMessage.From = "email@example.com"
objMessage.To = "firstname.lastname@example.org"
objMessage.TextBody = "This is some sample message text."
'==This section provides the configuration information for the remote SMTP server.
'==Normally you will only change the server name or IP.
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'Name or IP of Remote SMTP Server
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.myserver.com"
'Server port (typically 25)
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
'==End remote SMTP server configuration section==
I'd replace objMessage.TextBody = "This is some sample message text."
objMessage.TextBody = InputBox("Enter your problem")
This will then display an input box, and the output of that box will be set as the body.
There are currently 1 users browsing this thread. (0 members and 1 guests)