Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where do I have to parse new Mails with VBasic?

Status
Not open for further replies.

Fozi27

Programmer
Jan 17, 2003
2
DE
I would like to parse my incoming Mais for webbugs and other nasty things and do some substitutions on my outgoing mail. The parsing and the substitution is not the problem, I'm doing that with a scripting object written in Perl. But since I'm not very good in VBasic I'm having a hard time to figure out where to set the handle.

I have written an event handler named ItemSend witch looks like this:

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
If TypeName(Item) = "MailItem" Then
If Item.BodyFormat = olFormatHTML Then
Dim Worker As Object
Set Worker = CreateObject("Fozis.Mail.Worker")
Item.HTMLBody = Worker.yo(Item.HTMLBody)
End If
End If
End Sub

This code currently substitutes the nasty f-word with '*oops*' and 'fortunecookie' with a random quote.

While this is nice, I realy would like to parse my incoming mail *before* it gets shown. (Wheter upon recieving or when shown is not important for me.) I had no success in this. And, I would like to have the quote in the edit window.

Does one of you know how to do this?

Thanks in advance,

b.m. Fozi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top