Awhile back, I posted about using a Windows registry hack to cc: Junk Mail reports to SpamCop using Microsoft’s Junk Email report add-in for Outlook. That approach still works. However, there’s a gotcha. The add-in will always SEND the report using your default email account. That can be problematic if your ISP uses aggressive outgoing SPAM blocking since the very email you are reporting for SPAM looks like SPAM to the email host. Unless you have a way of whitelisting everything being sent to abuse@microsoft.com and <spamcop ID>@spamcop.net, you may find your spam reports bouncing.
Now thankfully, GMAIL will NOT bounce SPAM reports. I think, but can’t prove, that Google knows emails going to those two addresses are generally legit. But this creates a problem. What if your default account is not a Gmail account? Yes you can manually change the FROM address before you do a SEND/RECEIVE but that requires going to your Outbox and opening the spam report to fix it before Outlook does the actual Send.
The solution: a custom macro
I reached out to Diane Poremsky of Slipstick Systems who, IMHO, is probably the best resource for all things related to Microsoft Outlook and Exchange. She pointed me to a macro that had the fundamentals to do what I wanted with a few tweaks added by me.
What this macro does is create a SPAM report suitable for SpamCop AND it sets the FROM address to whatever email account you choose. In my case, my Gmail account. Note you will need to change the code highligted to suit what you need.
Sub ForwardSpam()
Dim olItem As Outlook.MailItem, olMsg As Outlook.MailItem
Dim strHeader As String
Dim strFWHeader As String
Dim strNote As String
Dim oAccount As Outlook.Account
For Each olItem In Application.ActiveExplorer.Selection
strHeader = GetInetHeaders(olItem)
strNote = ""
For Each oAccount In Application.Session.Accounts
If oAccount = "yourname@gmail.com" Then
Set olMsg = olItem.Forward
With olMsg
.To = "submit.yourID@spam.spamcop.net"
.BodyFormat = olFormatPlain
.Body = strNote & vbCrLf & vbCrLf & strHeader & vbCrLf & vbCrLf & olItem.Body
.SendUsingAccount = oAccount
.Display ' change to .send when satisfied
End With
End If
Next
olItem.Delete
Next
Set olMsg = Nothing
End Sub
Function GetInetHeaders(olkMsg As Outlook.MailItem) As String
' Purpose: Returns the internet headers of a message.'
' Written: 4/28/2009'
' Author: BlueDevilFan'
' //techniclee.wordpress.com/
' Outlook: 2007'
Const PR_TRANSPORT_MESSAGE_HEADERS = "http://schemas.microsoft.com/mapi/proptag/0x007D001E"
Dim olkPA As Outlook.PropertyAccessor
Set olkPA = olkMsg.PropertyAccessor
GetInetHeaders = olkPA.GetProperty(PR_TRANSPORT_MESSAGE_HEADERS)
Set olkPA = Nothing
End Function
Also, once you a satisfied the macro works how you want, change the .Display command to .send. The easiest way to use the macro is to assign it to a button. Also, you will have to get past Outlook security by self-signing the macro. That’s beyond the scope of this article but Slipstick has several good articles on doing this as well as explanations of how to properly setup macros.
This code should work in all desktop editions of MS Outlook from 2010 through 2021.