My employer recently switched from Symantec Brightmail to Sophos PureMessage. Now I am missing out on the Brightmail Plug-in for Outlook that helped removing and reporting false negatives.
So I hacked something for Outlook 2003 in an almost dead-language. Now I can hit a button in the main toolbar and shoot spam on sight.
Be warned: There are three dangerous functions in this code:
- Permanently deletes selected messages
- Sends message to firstname.lastname@example.org on behalf of the user without confirmation
- Permanently deletes the sent message
For your safety, add a confirmation dialog and error handling.
Apparently you have to enable macros or sign the macro project with a trusted code-signing certificate, or this code does nothing but display warnings.
Dim m As MailItem
Dim x As Integer
Dim sel As Selection
Dim a As MailItem
Dim d() As MailItem
Set sel = Application.ActiveExplorer.Selection
If (sel.Count = 0) Then
ReDim d(1 To sel.Count)
Set m = Application.CreateItem(olMailItem)
m.To = "email@example.com"
m.Subject = "Spam Samples"
m.Importance = olImportanceLow
m.ExpiryTime = DateAdd("h", 1, Now)
m.DeleteAfterSubmit = True
For x = 1 To sel.Count
Set a = sel.Item(x)
Set d(x) = a
For Each v In d
Please note: Provided "AS IS" without warranties of any kind, neither express nor implied, including but not limited to correctness or fitness for a particular purpose. Under no circumstances shall I be held liable for any damage this code snippet may do, including but not limited to loss of email message or revenue or public respect.