Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Dim oName, ODomain, oMyIP, oTo
' Get the computer name
Set WshNetwork = CreateObject("WScript.Network")
oName = WshNetwork.ComputerName
' Set the company specific information
' Company Internet Domain Name
ODomain = "my.domain"
' Set the SMTP server IP
oMyIP = "10.0.0.0"
' Where do you want the message to be delivered
oTo = "my@email.com"
' Set the visual basic constants as they do not exist within VBScript.
' Do not set your smtp server information here.
Const cdoSendUsingMethod = "[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendusing",[/URL] _
cdoSendUsingPort = 2, _
cdoSMTPServer = "[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpserver"[/URL]
'// Create the CDO connections.
Dim iMsg, iConf, Flds
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
'// SMTP server configuration.
With Flds
.Item(cdoSendUsingMethod) = cdoSendUsingPort
'// Set the SMTP server address here.
.Item(cdoSMTPServer) = oMyIP
.Update
End With
'// Set the message properties.
With iMsg
Set .Configuration = iConf
.To = oTo
.From = oName & "@" & oDomain
.Subject = "Val Thorens"
'.TextBody = "Server " & oName & " at company " & ODomain & " was restarted " & now
End With
'// Download Webpage to file.
dim message, conf, stream
set message = CreateObject("CDO.Message")
set conf = CreateObject("CDO.Configuration")
set message.Configuration = conf
message.CreateMHTMLBody "[URL unfurl="true"]http://www.skifrance.fr/index.cfm?fuseaction=bn.detail&langue=a&IDS=730052"[/URL]
set stream = message.GetStream()
stream.SaveToFile "C:\valthorens.mht"
'// An attachment can be included.
iMsg.AddAttachment "C:\valthorens.mht"
'Send the message.
iMsg.Send
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile("C:\valthorens.mht"), DeleteReadOnly
Set WshNetwork = nothing
Set iMsg = nothing
Set iConf = nothing
Set Flds = nothing
Set objFSO = nothing