Wednesday, January 10, 2007

How to Hide the Outlook Envelope Icon When You Get Spam

This story has moved to NerdBoys.com. Please read this story at its new location.

8 comments:

Anonymous said...

Hi, I am looking for just the opposite: I want to programmatically make the envelope appear.
Let me explain: when I receive a fax in msfax, I save the tiff, and make an "email" out of it. But even when I mark this "email" as unread I don't see the outlook envelope. Your example code you used in previous versions of outlook works in VBA (access), so maybe you can help me, perhaps tell me what lines to change in your code to get the icon to appear?
Greetings,
Wim K.

Joe said...

Sorry, Wim, I have no suggestions.

Anonymous said...

An alternative to the always-move-to-the-Junk-E-mail-folder, is to modify the rule actions setting "mark as read" in addition to the move to the SPAM folder. This notification-icon-set-for-deleted-spam has been bugging me for months as the volume of spam increased -- and I did not realize that your solution of using the Junk E-mail folder would solve the problem. I was exploring writing some custom code when the idea about using the rule's "mark as read" finally hit me.

Anonymous said...

Maybe you can help! I use the built-in Junk filtering Outlook supplies for my workstation. Junk is placed in the Junk Email folder just fine. I unfortunately get the damn notification envelope in the system notification area when all I have is spam. Following your lead a bit and piecing togethar macro code, I wrote a macro to mark everything in the Junk email folder as unread thinking this would remove the notification icon. Unfortunately the folder tree doesn't update its count of unread messages and still lists all the messages I just marked as unread as still being there...and the notification envelope by the clock stays as well. do you know of a way to refresh the folder tree? I am going out on a limb and assuming this will clear the envelope in the notification area as well...

Joe said...

anon,

No, marking the mail as read will NOT work. Intuitively, you'd think it would work but it doesn't. The key to my rule-based solution is that it moves suspected spam from the Inbox folder to the magical Junk E-Mail. My rule, made with the Outlook Rules Wizard is:

Apply this rule after the message arrives
with **THIS IS FRIGGING SPAM** in the subject
move it to the Junk E-mail folder

Note that my solution relies on having a Spam Assassin intercept the spam and prepend "**THIS IS FRIGGING SPAM**" to the subject line, before depositing it in my inbox. In other words, the message first goes into my inbox, not the Junk E-Mail folder and then the rule detects it as spam and moves it to the Junk E-Mail. Then, for some reason, Outlook magically turns off the envelope thingy.

You might be able to adapt my rule to your situation where the message seems to get delivered directly to the Junk E-Mail folder instead of first going into the Inbox.

I hope that helps.

Anonymous said...

hey man!

thanks for this - the faux notification for spam has been driving me up the wall...

our work system is similar to yours, spam gets tagged in the subject so i created a rule to detect them and perma-delete... it worked but i still had the notification....

changing the rule to move to the junk folder instead totally worked!...

one thing to bear in mind - if you try to add anything fancy to the rule, that turns it into a client-side only rule, the problem reoccurs... this included trying to mark the messages as read in the junk folder, or attempting to delete them (which just error'd the rule)... but i can live with a right-click empty, so long as the icon leaves me alone! :)

thanks again matey!

Unknown said...

I'm trying to do the same. But I don't want the emails to go to the junk folder. I want them to go to another personal folder, but I don't want the envelope icon to appear. Any suggestions would be very appreciated!! Thank you very much!

Anonymous said...

Thank you! Exactly what I was looking for. Outlook can be incredibly counter intuitive at times. I'm assuming after setting up the rule, you will then modify the Junk E-mail folder properties to permanently delete periodically.