Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 11 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Const fromEmail = "me@gmail.com"
Const password = "*******"
Dim msg, emailConfig
Set msg = CreateObject("CDO.Message")
With Msg
.From = fromEmail
.To = "cashcashjonny@yahoo.com"
.Subject = "Hello"
.TextBody ="sample CDO message"
Set emailConfig = msg.Configuration
emailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
emailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
emailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
emailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
emailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = true
emailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = fromEmail
emailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = password
emailConfig.Fields.Update
.Send
End With
Set msg = nothing
Set emailConfig = nothing
I want to know if the first script works on all vista machines or if it only works because of something else (maybe the network card), so I will know whether to get a copy of vista or a different network card - (ultimately I want to send email without logging on to a SMTP server or going round to borrow my mums computer).
Any intelligence you can supply in relation to this matter would be much appreciated.
Thanks.
cashcashjonny
2012-04-16 11:19:31
Ok thanks jvierra, I tried the first code on the vista machine again ... but using a different internet connection. This time the code failed. It turns out ... there was software from the isp installed for the first connection ... making a link to their SMTP server.
This topic is 11 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.