' *********************************************************************** ' ' * Script to go online, send an e-mail, then go offline. You may * ' ' * need to adjust each of the calls to WaitSecs to meet your own * ' ' * needs. * ' ' * * ' ' * - Scott Crevier, 21-Mar-2000 * ' ' * scott@crevier.org * ' ' * www.x10.crevier.org * ' ' *********************************************************************** ' sub main() ' *************************************************************** ' ' * Initialize some variables. * ' ' *************************************************************** ' Dim vETo, vEFrom, vESubj, vEMesg vETo = "your@emailaddress.com" vEFrom = "from@emailaddress.com" vESubj = "Notification" vEMesg = "This is an e-mail test." ' *************************************************************** ' ' * Connect up. * ' ' *************************************************************** ' hs.speak "Connecting to the internet." InternetConnect hs.speak "You are now online." hs.WaitSecs 2 ' *************************************************************** ' ' * Send the e-mail. * ' ' *************************************************************** ' hs.speak "Sending the e-mail message." hs.SendEmail vETo,vEFrom,vESubj,vEMesg hs.WaitSecs 2 ' *************************************************************** ' ' * Disconnect. * ' ' *************************************************************** ' hs.speak "Disconnecting your internet connection." InternetDisconnect hs.speak "You are now offline." end sub ' *********************************************************************** ' ' * Subroutine to connect to the internet. * ' ' *********************************************************************** ' Sub InternetConnect() hs.launch "c:\program files\dialup\dialup.exe","Your DUN Name" hs.WaitSecs 12 End Sub ' *********************************************************************** ' ' * Subroutine to disconnect from the internet. * ' ' *********************************************************************** ' Sub InternetDisconnect() hs.launch "c:\program files\connectionmanager\connectionmanager.exe","/h" hs.WaitSecs 7 End Sub