How to move an incoming mail to a folder depending on mail header content?
Does anyone know if it is possible to access the mail header information from VBA in Outlook 2002?
Our incoming spam are marked with X-Spam-Flag in the header information and it would be really nice to be able to trash these mails automatically.
This is, unfortunatly, not working with the built-in rules in Outlook. Those rules only work with Subject, body and sending address not with mail header as far as I can understand.
/Anders
It works with Outlook rules!
It does actually work with the Outlook rules! I didn't understand at first because of a bad translation of mail header to Swedish (I am using Swedish version of Outlook). The translation made you think it concerned Subject rather than Mail header.
In the rules whizard you can click next in the first dialog and then a bit further down, you can choose to filter on mail header content. And this works with the mails that are marked with the Spam-Assassin flag! :-)
Thanks anyway for your interest and I have learnt how to handle incoming mails in VBA! That's just great!
/Anders