Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Spoof filter (http://www.outlookbanter.com/outlook-vba/7192-spoof-filter.html)

Michael Bauer January 9th 06 07:20 AM

Spoof filter
 
Am Fri, 6 Jan 2006 15:01:03 -0800 schrieb Stuart P. Bentley:

In OL = XP you can create a rule that checks for the senderīs domain and
run a script.

You can then use the Instr function and search in the body e.g. for www.*.*,
http:/*, file:/*, https:/*.

If the message contains one of the searched strings use the Move function
for moving it into another folder.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook



I want to create a spoof filter that

If a message comes from the "paypal.com" domain
*Except if from "spoof"
And the message contains hyperlinks that do not lead to sites in the
"paypal.com" domain

Then forward the message as an attachment to "
*And move it to the "Spoofs" folder.

How would/should I go about doing this?


Stuart P. Bentley January 9th 06 08:17 PM

Spoof filter
 
OK, so that'd search within the HTML itself for the true URL of the
hyperlink? How exactly would I code this?

instr find http://* NOT http://www.paypal.com?

And then what? My coding experience is limited to a bit of C++ console
programming.

"Michael Bauer" wrote:

Am Fri, 6 Jan 2006 15:01:03 -0800 schrieb Stuart P. Bentley:

In OL = XP you can create a rule that checks for the senderÂīs domain and
run a script.

You can then use the Instr function and search in the body e.g. for www.*.*,
http:/*, file:/*, https:/*.

If the message contains one of the searched strings use the Move function
for moving it into another folder.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook



I want to create a spoof filter that

If a message comes from the "paypal.com" domain
*Except if from "spoof"
And the message contains hyperlinks that do not lead to sites in the
"paypal.com" domain

Then forward the message as an attachment to "
*And move it to the "Spoofs" folder.

How would/should I go about doing this?



Michael Bauer January 10th 06 08:55 AM

Spoof filter
 
Am Mon, 9 Jan 2006 12:17:03 -0800 schrieb Stuart P. Bentley:

You need the functions InStr and Mid. In HTML messages you can search for
the a href tag with InStr. From that position search the next /a tag.
Within that substring determine what exactly the url is and if itīs
paypal.com (or whatever) or not.

Please have a look into the Object Browser (F2). Switch from All Libraries
to Outlook, and select MailItem in the left pane. In the right pane you can
now see all the MailItemīs methods, properties etc. Select the Move function
and press F1. That leads you to the VBA help topic with a sample.

(The same works for the Forward function, of course).

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook



OK, so that'd search within the HTML itself for the true URL of the
hyperlink? How exactly would I code this?

instr find http://* NOT http://www.paypal.com?

And then what? My coding experience is limited to a bit of C++ console
programming.

"Michael Bauer" wrote:

Am Fri, 6 Jan 2006 15:01:03 -0800 schrieb Stuart P. Bentley:

In OL = XP you can create a rule that checks for the senderīs domain and
run a script.

You can then use the Instr function and search in the body e.g. for

www.*.*,
http:/*, file:/*, https:/*.

If the message contains one of the searched strings use the Move function
for moving it into another folder.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook



I want to create a spoof filter that

If a message comes from the "paypal.com" domain
*Except if from "spoof"
And the message contains hyperlinks that do not lead to sites in the
"paypal.com" domain

Then forward the message as an attachment to "
*And move it to the "Spoofs" folder.

How would/should I go about doing this?




All times are GMT +1. The time now is 10:30 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright Đ2004-2006 OutlookBanter.com