Spoof filter

G

Guest

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 "(e-mail address removed)"
*And move it to the "Spoofs" folder.

How would/should I go about doing this?
 
M

Michael Bauer

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.
 
G

Guest

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.
 
M

Michael Bauer

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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top