Hi,
I'm sending an email message and my code below worked (at home) - the smtp setttings that I used didn't require a secure connection. I tried on different machine (clients) and got the message above. How can I add get this to go away?
Set objEmail = CreateObject("CDO.Message")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = WScript.CreateObject ("WScript.Shell")
computerName = objShell.ExpandEnvironmentStrings("%COMPUTERNAME%")
userName = objShell.ExpandEnvironmentStrings("%USERNAME%")
mailsubject="This is the subject"
mailbody="This is the body here"
objEmail.From = userName & "@domain.com"
objEmail.To = "gogo@sympatico.ca"
objEmail.Subject = mailSubject
objEmail.Textbody = "User: " & userName & " on computer \\" & computerName & " " & mailBody
objEmail.Configuration.Fields.Item _
(" = 2
objEmail.Configuration.Fields.Item _
(" = _
"smtp.gmail.com"
objEmail.Configuration.Fields.Item _
(" = 25
objEmail.Configuration.Fields.Update
objEmail.Send
Any help would be greatly appreaciated
Tx
Grd
I'm sending an email message and my code below worked (at home) - the smtp setttings that I used didn't require a secure connection. I tried on different machine (clients) and got the message above. How can I add get this to go away?
Set objEmail = CreateObject("CDO.Message")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = WScript.CreateObject ("WScript.Shell")
computerName = objShell.ExpandEnvironmentStrings("%COMPUTERNAME%")
userName = objShell.ExpandEnvironmentStrings("%USERNAME%")
mailsubject="This is the subject"
mailbody="This is the body here"
objEmail.From = userName & "@domain.com"
objEmail.To = "gogo@sympatico.ca"
objEmail.Subject = mailSubject
objEmail.Textbody = "User: " & userName & " on computer \\" & computerName & " " & mailBody
objEmail.Configuration.Fields.Item _
(" = 2
objEmail.Configuration.Fields.Item _
(" = _
"smtp.gmail.com"
objEmail.Configuration.Fields.Item _
(" = 25
objEmail.Configuration.Fields.Update
objEmail.Send
Any help would be greatly appreaciated
Tx
Grd