' DeleteSpam.vbs ' VBScript program to scan Outlook Inbox for messages believed to be ' spam and delete them. Any message with HTML source code that either ' has an executable attachment, or references the Internet, is judged ' to be a spam message. Caution: Some of the messages deleted by this ' program may not be spam. It is recommended that you review the deleted ' messages in your "Deleted Items" folder before emptying the folder. ' ' ---------------------------------------------------------------------- ' Copyright (c) 2003-2010 Richard L. Mueller ' Hilltop Lab web site - http://www.rlmueller.net ' Version 1.0 - December 3, 2003 ' Version 1.1 - November 6, 2010 - No need to set objects to Nothing. ' Version 1.2 - November 13, 2021 - Add filters for https://. ' ' You have a royalty-free right to use, modify, reproduce, and ' distribute this script file in any way you find useful, provided that ' you agree that the copyright owner above has no warranty, obligations, ' or liability for such use. Option Explicit ' Declare variables. Dim objOutlook, objNamespace, lngSpam, lngTotal Dim strScriptPath, strScriptName, strScriptFolder, objFolder Dim objItem, j, k, intAttach, lngCount, blnSpam Dim strHTMLBody, blnExe Dim intF1, intF2, intF3, intF4, intF5, intF6 ' Define strings to search for in messages. Const strFilter1 = "