hi all...
I wanted an easy way for users to report misidentified spam/ham especially in the early stages of training my assp db...
here is a macro that works in outlook 2002(xp)
you have to first install redemption which can be found here
spam reporting macro:-----------------------------------------------
Sub ForwardToSpam()
Dim objOL As Outlook.Application
Dim objSelection As Outlook.Selection
Dim objMsg As Object
Dim objNewMsg As Object
On Error Resume Next
' Instantiate an Outlook Application object
Set objOL = CreateObject("Outlook.Application")
' Get the collection of selected objects
Set objSelection = objOL.ActiveExplorer.Selection
' This code sends the all of the selected mail items
' one at a time.
For Each objMsg In objSelection
' This code sends one selected mail item at a time
If objMsg.Class = olMail Then
' Create a new mail item
Set objNewMsg = Application.CreateItem(olMailItem)
' send the new mail item to the spam reporting email address
objNewMsg.To = "assp-spam@yourdomain.com"
objNewMsg.Subject = objMsg.Subject
'save the new mail before adding attachments
objNewMsg.Save
' add selected mail item as attachment to new mail item
objNewMsg.Attachments.Add objMsg
' send the new mail item
Set objSafeMail = CreateObject("Redemption.SafeMailItem")
objSafeMail.Item = objNewMsg
objSafeMail.Send
' Clear the New Mail Item object
Set objNewMsg = Nothing
' Delete the spam mail item
objMsg.Delete
End If
Next
Set objMsg = Nothing
Set objSelection = Nothing
Set objOL = Nothing
Dim oBtn As CommandBarButton
Set oBtn = Application.ActiveExplorer.CommandBars.FindControl(1, 5488)
oBtn.Execute
Set oBtn = Nothing
MsgBox "Thank you for reporting spam!"
End Sub
What this will do is allow you to control click on multiple spam emails and then click on a button on your outlook toolbar to forward them as attachments to your assp web interface. This process will delete the offending email. I updated the the macro so that you don't have to push send receive anymore
Here is the macro to report misidentified ham or good email----------------------
Sub ForwardToNotSpam()
Dim objOL As Outlook.Application
Dim objSelection As Outlook.Selection
Dim objMsg As Object
Dim objNewMsg As Object
On Error Resume Next
' Instantiate an Outlook Application object
Set objOL = CreateObject("Outlook.Application")
' Get the collection of selected objects
Set objSelection = objOL.ActiveExplorer.Selection
' This code sends the all of the selected mail items
' one at a time.
For Each objMsg In objSelection
' This code sends one selected mail item at a time
If objMsg.Class = olMail Then
' Create a new mail item
Set objNewMsg = Application.CreateItem(olMailItem)
' send the new mail item to the spam reporting email address
objNewMsg.To = "assp-notspam@yourdomain.com"
objNewMsg.Subject = objMsg.Subject
'save the new mail before adding attachments
objNewMsg.Save
' add selected mail item as attachment to new mail item
objNewMsg.Attachments.Add objMsg
' send the new mail item
Set objSafeMail = CreateObject("Redemption.SafeMailItem")
objSafeMail.Item = objNewMsg
objSafeMail.Send
' Clear the New Mail Item object
Set objNewMsg = Nothing
End If
Next
Set objMsg = Nothing
Set objSelection = Nothing
Set objOL = Nothing
'send and receive
Dim oBtn As CommandBarButton
Set oBtn = Application.ActiveExplorer.CommandBars.FindControl(1, 5488)
oBtn.Execute
Set oBtn = Nothing
MsgBox "Thank you for reporting misidentified spam. "
End Sub
There is another macroset that works for outlook 2003 that doesn't require hitting send/receive or the redemption dll. I will post that sub in a day or two. NOTE this macro will not delete the good spam after reporting
Good luck to all...
and thank you Martin for making such a magnificent HMS program.....
HOWTO: Add ASSP multiple report buttons in Microsoft Outlook
HOWTO: Add ASSP multiple report buttons in Microsoft Outlook
Last edited by jpeoples on 2006-02-17 14:32, edited 1 time in total.
-
- Senior user
- Posts: 886
- Joined: 2005-11-28 11:43
I would recomend using http://www.OLSpamCop.org/ for the purpose - it's free and installs easily into Outlook -- as it works with any reporting service, it is soon being renamed, but for now it still carries SpamCop in the name as that was it's original use.
well that certainly is an option. however, these macro's work perfectly and are simple to install across a medium sized domain. while i didn't actually go through the entire installation and configuration process of ol spam cop, it seemed to be a whole lot more complicated than installing these simple macro's...and i might add that installing the redemption outlook plugin was also part of the procedure for it as well. so to each his or her own (who thought i'd get politically correct at my advancing state of longevity?)....
-
- Senior user
- Posts: 886
- Joined: 2005-11-28 11:43
While browsing the ASSP website I came across this which might be use for people. It's a ASSP toolbar for outlook.
http://www.asspsmtp.org/wiki/ASSP_Toolbar_for_Outlook
I've tested this with outlook 2007 and it seems to do the job.
http://www.asspsmtp.org/wiki/ASSP_Toolbar_for_Outlook
I've tested this with outlook 2007 and it seems to do the job.